Posted on

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 into so far, things started working after I moved Relevanssi to a slightly later priority, so it runs after UAM. That’s easy to do, just add the following code to your theme functions.php:

add_filter('after_setup_theme', 'rlv_move_to_later_priority');
function rlv_move_to_later_priority($priority) {
	remove_filter('the_posts', 'relevanssi_query');
	add_filter('the_posts', 'relevanssi_query', 11);
}

Leave a Reply

Your email address will not be published. Required fields are marked *