Continue reading Indexing only some visible shortcodes

Indexing only some visible shortcodes

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 shortcodes 0 Comment on Indexing only some visible shortcodes
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 2 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
Continue reading How to index usermeta fields in Relevanssi

How to index usermeta fields in Relevanssi

Relevanssi Premium can index user profiles. Users may have meta fields attached to them: there’s a wp_usermeta database table, even though the user editing interface by default doesn’t have any tools to add meta fields to users. Codex includes documentation on how to use the user meta fields. Read Working with User Metadata for code…

Read more How to index usermeta fields in Relevanssi 0 Comment on How to index usermeta fields in Relevanssi
Continue reading Controlling attachment types in index

Controlling attachment types in index

Relevanssi lets you index attachments – not their contents, but the names and descriptions. But perhaps you only want to index a particular type of attachment? Relevanssi settings don’t have any control over that, it’s either all attachments or nothing. It is possible to choose which kinds of attachments are indexed. It is done with the…

Read more Controlling attachment types in index 0 Comment on Controlling attachment types in index
Continue reading Keyword-based search blocking

Keyword-based search blocking

If your search logs are full of spam with repeating keywords, you’re being targeted by a spammer. Their goal is to get visibility to their malicious URLs, hoping Google will index your search results pages with their spam URL in it. There are probably better ways to stop these kinds of spammers, but here’s one…

Read more Keyword-based search blocking 0 Comment on Keyword-based search blocking
Continue reading Restricting the indexing to particular user roles

Restricting the indexing to particular user roles

From the Relevanssi settings, you can only choose whether subscribers are indexed or not. If you need finer control over what user roles are indexed by Relevanssi, you can use the following code. Place it in your theme functions.php: add_filter(’relevanssi_user_index_ok’, ‘rlv_do_not_index_admins’, 10, 2); function rlv_do_not_index_admins($do_index, $user) { $block_these_roles = array(’administrator’, ‘editor’, ‘author’, ‘contributor’, ‘subscriber’);  …

Read more Restricting the indexing to particular user roles 0 Comment on Restricting the indexing to particular user roles
Continue reading bbP Private Groups support

bbP Private Groups support

Private Groups is a plugin that makes bbPress forum groups private. Relevanssi, however, doesn’t understand that privacy and will show those groups in the search results. Relevanssi has means to support this, however, with the help of the relevanssi_post_ok filter. Here’s some code from Mark Wass that makes the private forum posts private in search.…

Read more bbP Private Groups support 0 Comment on bbP Private Groups support