Continue reading The wrong content gets indexed for a post

The wrong content gets indexed for a post

…this problem by checking the posts involved with the Relevanssi debugger that shows how Relevanssi has indexed the post. If you have this specific problem, you’ll find that the posts either have no or too little content indexed, or have a lot of content that seems to be from the…

Read more The wrong content gets indexed for a post 0 Comment on The wrong content gets indexed for a post
Continue reading Debugging with Query Monitor

Debugging with Query Monitor

…Clicking the admin bar output opens up the Query Monitor panel and from there, you can access all sorts of information. When debugging Relevanssi searching issues, we’re mostly interested in the Queries part, and you can set the “Caller” to relevanssi_search() to exclude all non-Relevanssi queries. The highlighted query that……means the titles and content have a weight of 5, while comments have a weight of 0.75. Having a weight for titles or content is a fairly common problem that can be spotted from the query. This is the most relevant part in Query Monitor for Relevanssi debugging use, but…

Read more Debugging with Query Monitor 0 Comment on Debugging with Query Monitor
Continue reading Relevanssi indexes excluded posts

Relevanssi indexes excluded posts

…easy: just add the shortcode to the list of disabled shortcodes. Problem solved! This is easy to do in Relevanssi Premium where the list of disabled shortcodes is a simple setting field on the indexing settings page. With the free version, you can adjust this with the relevanssi_disabled_shortcodes filter hook….…was showing posts from the publication post type, even though that post type was excluded from the index. The reason was a shortcode, publication_archive, that was used on a page to display an archive of publications. The shortcode function fetched the posts with WP_Queryand changed the global $post object. That……theme search is not using Relevanssi for some reason. Common causes for indexing the wrong post types The most common reason for index including the wrong post type is a shortcode or some other feature that displays posts and confuses Relevanssi. In the case that prompted this post, the search…

Read more Relevanssi indexes excluded posts 3 Comments on Relevanssi indexes excluded posts
Continue reading Debugging indexing problems

Debugging indexing problems

The easiest way to debug indexing problems is to use the WP CLI tools available in Relevanssi Premium. To see how Relevanssi sees the post 123, just use the following command on the command line: wp relevanssi index –post=123 –index_debug=true This will print out how Relevanssi sees the post, how…

Read more Debugging indexing problems 2 Comments on Debugging indexing problems
Continue reading Pinning and exclusion doesn’t work for custom post types in Gutenberg

Pinning and exclusion doesn’t work for custom post types in Gutenberg

Sometimes when you try to access the pinning or the exclusion settings for a custom post type post in the Relevanssi Gutenberg sidebar, you come across this error message: If you copy the error, the relevant beginning will look like this: Error: An error occurred while running ‘mapSelect’: Cannot read property ‘_relevanssi_pin_keywords’ of undefined The…

Read more Pinning and exclusion doesn’t work for custom post types in Gutenberg 0 Comment on Pinning and exclusion doesn’t work for custom post types in Gutenberg
Continue reading Debugging Relevanssi searching issues

Debugging Relevanssi searching issues

…admin search. Before checking the filters, try the Relevanssi admin search (Dashboard > Admin search). Does that find the correct results? If it does, then the problem is likely with your theme. Use Query Monitor Query Monitor is a superb tool for debugging WordPress behaviour. It’s very useful for debuggingRelevanssi has plenty of useful filter hooks you can use to debug problems. Here are some examples of how you can use the Relevanssi filter hooks to debug issues. Add the functions one at a time to your site and run a search to see results. First, try the Relevanssi…

Read more Debugging Relevanssi searching issues 11 Comments on Debugging Relevanssi searching issues
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.

Read more Menu problems in multisite search 0 Comment on Menu problems in multisite search
Continue reading Results are in strange order

Results are in strange order

If best results don’t come up first and changing weighting settings doesn’t seem to make any difference, there couple of things you can do. Is Relevanssi active? The first thing is to check if the results are actually provided by Relevanssi. If you disable Relevanssi, do the results change? Do you see Relevanssi-generated excerpts? There…

Read more Results are in strange order 3 Comments on Results are in strange order
Continue reading Most important Relevanssi debugging trick

Most important Relevanssi debugging trick

When you have problems with Relevanssi, these are the first steps to take: Make sure you have the latest version of Relevanssi. If not, upgrade. Try deactivating the plugin and reactivating it. Are you using Yoast Local SEO? Read this. Try deleting the plugin and reinstalling it from scratch. If…

Read more Most important Relevanssi debugging trick 271 Comments on Most important Relevanssi debugging trick