Searching with Relevanssi plugin
-
Hi,
I’ve been having trouble searching my site for content located inside and outside of Knowledgebase, so I downloaded the Relevanssi plugin you recommended. Unfortunately it isn’t allowing me to search for Knowledgebase content.In Relevanssi’s indexing settings, it acknowledges that kbe_knowedgebase exists and that it can be indexed, but it lists kbe_knowedgebase as “private”. Might this problem be fixed by changing kbe_knowedgebase to “public”? Unfortunately, I’m not sure how to do this.
I’ve also tried fixing this issue by adding the following function, recommended in a previous post, to wp-widget-search.php:
function filter_search($query) {
if ($query->is_search) {
$query->set(‘post_type’, array(‘post’, ‘kbe_knowledgebase’));
};
return $query;
};
add_filter(‘pre_get_posts’, ‘filter_search’);The above function allows the search to find Knowledgebase content but stops the search from finding pages outside Knowledgbase.
This is for an intranet site on a private network. For you to look at the, problem could I send you the files?
- The topic ‘Searching with Relevanssi plugin’ is closed to new replies.