Continue reading How to index parent categories

How to index parent categories

Suppose you have a parent category with no products in it but a child category does. If you search by the parent category can relevanssi be set up to show the products in the child category? Cars > Wiper Blades. A search for cars shows wiper blade products. By default this does not work, because…

Read more How to index parent categories 3 Comments on How to index parent categories
Continue reading bbPress: Indexing topics and replies

bbPress: Indexing topics and replies

Relevanssi does work with BBPress. BBPress forums, topics and replies are regular WordPress posts. In order to get Relevanssi working with BBPress, you need to make Relevanssi index post type topic (forget forum, and I think it’s better if you skip reply as well). Since topic is non-public post type, you also need to uncheck…

Read more bbPress: Indexing topics and replies 6 Comments on bbPress: Indexing topics and replies
Continue reading Ordering search results by date

Ordering search results by date

I’m building a directory and would like the oldest posts to automatically display first in the search results, is this possible? I found out how to add a link that the user can click to sort the results but would like an automatic solution. Can you provide code that can be added to the functions.php…

Read more Ordering search results by date 3 Comments on Ordering search results by date
Continue reading The search form shortcode

The search form shortcode

Relevanssi includes a search form shortcode that can be used to display a search form. The shortcode is searchform and it was introduced in Relevanssi Premium 2.0 and Relevanssi 4.0. Adding query parameters This shortcode prints out a basic search form. If you want to add additional query parameters, that’s easy: just add parameters to…

Read more The search form shortcode 95 Comments on The search form shortcode
Continue reading Using multiple custom taxonomies

Using multiple custom taxonomies

Usually, WordPress supports one category, one tag and one taxonomy in the search, if you use the query variables to set the taxonomies. You can enter multiple taxonomies as parameters to the query, but only the first one is used. If you want to have multiple taxonomies involved, you need to build a tax_query. The…

Read more Using multiple custom taxonomies 52 Comments on Using multiple custom taxonomies
Continue reading How to include specific posts

How to include specific posts

Hello, I’m using WooCommerce and Relevanssi and they work great. My Site Search only searches Products, however I want to let certain posts appear in the search results. Is there a way to allow certain posts to be in the results? Yes. There are many ways to do this, and the best way depends on…

Read more How to include specific posts 2 Comments on How to include specific posts
Continue reading Search results in random order

Search results in random order

Do you want to order your search results in random order? Here’s how: Add this function to your site and the search results will appear in random order. You can also do this: However, both of these solutions only work if all the search results are on the same page. If the results span multiple…

Read more Search results in random order 1 Comment on Search results in random order
Continue reading Adjusting search throttle

Adjusting search throttle

If Relevanssi Premium causes out-of-memory problems, make sure you have the “Throttle searches” option checked. However, if that doesn’t work and you’re still getting out of memory issues, you can try making the throttle tighter. The limit can be adjusted by adding this line to your site: If necessary, you can adjust the value (250)…

Read more Adjusting search throttle 7 Comments on Adjusting search throttle