Continue reading Showing only one recurring event

Showing only one recurring event

Some event calendar plugins do recurring events by creating many posts. That’s fine, until those cloned posts fill up your search results. This function, added to your theme functions.php, will only show one of each post with the same title, and will take the one with the first date. The date is checked from _EventStartDate…

Read more Showing only one recurring event 2 Comments on Showing only one recurring event
Continue reading Indexing product variation SKUs for main product

Indexing product variation SKUs for main product

Relevanssi can index product and product variation SKUs for WooCommerce products: just add _sku to list of custom fields to index. However, if you want to find the main product when searching for the product variation SKU, you need some extra code. Just add this function to the theme functions.php and rebuild the index: add_filter(’relevanssi_content_to_index’,…

Read more Indexing product variation SKUs for main product 0 Comment on Indexing product variation SKUs for main product
Continue reading Scroll result page to the search term

Scroll result page to the search term

Relevanssi can highlight search terms on the posts (which is a feature I generally don’t recommend, as it may lead to some compatibility issues). But how about scrolling the page to show the location where the search results are? That is also possible. It requires a bit of JavaScript on the post page. This script…

Read more Scroll result page to the search term 3 Comments on Scroll result page to the search term
Continue reading Private custom fields

Private custom fields

I use private custom fields. I want to index them in the administration but not on the public site. How to do ? Initially this seems impossible to do with Relevanssi, but it’s possible. Doing this requires Relevanssi Premium. The free version doesn’t know which custom field matches the search term, it just knows some custom…

Read more Private custom fields 0 Comment on Private custom fields
Continue reading Indexing only some visible custom fields

Indexing only some visible custom fields

I am running another plugin, which uses custom fields that are visible, but I don’t want to include them in my search results. Is there a way to allow Relevanssi to continue index visible custom fields, but exclude few specific ones that I do not want indexed? Yes: the list of custom fields is passed through the…

Read more Indexing only some visible custom fields 7 Comments on Indexing only some visible custom fields
Continue reading Conflict with User Access Manager

Conflict with User Access Manager

Relevanssi has a conflict with User Access Manager plugin. Both plugins attach to the same `the_posts` filter hook with the same priority, and if UAM runs after Relevanssi, it may cause some issues, like missing excerpts or even broken search results pages. The solution seems simple, however: at least in the one case I’ve run…

Read more Conflict with User Access Manager 0 Comment on Conflict with User Access Manager
Continue reading Hidden WooCommerce products in search

Hidden WooCommerce products in search

Relevanssi by default shows hidden WooCommerce products in the search results. It is quite easy to make Relevanssi not to display hidden products in the results. The best way is to unindex the products, so that they don’t appear in the index at all. How that is done, depends on the version of WooCommerce you’re…

Read more Hidden WooCommerce products in search 19 Comments on Hidden WooCommerce products in search
Continue reading Menu problems in multisite search

Menu problems in multisite search

Sometimes multisite searches cause problems in navigation menus. This is caused by pages from another subsite going into the page cache, and then replacing a page in the navigation menu with the same page ID. If you’re having this problem, adding the following code to the theme functions.php should solve the issue. add_action(’wp_head’, ‘rlv_uncache_menu_posts’, 99);…

Read more Menu problems in multisite search 0 Comment on Menu problems in multisite search