Posted on

Yoast SEO

Starting from versions 2.4.0 (Premium) and 4.3.0 (Free), Relevanssi doesn’t index posts that have been marked “noindex” in the Yoast SEO settings (“Allow search engines to show this Post in search results?”). If the “noindex” setting is in the default value or set to explicit “yes”, Relevanssi indexes the post.

If you want Relevanssi to disregard the Yoast SEO “noindex” setting, you can adjust that from the advanced indexing settings.

Using Yoast SEO title instead of post title

This little function in your functions.php will make Relevanssi use the Yoast SEO title instead of post title when indexing posts:

add_filter( 'relevanssi_post_title_before_tokenize', 'rlv_use_yoast_title', 10, 2 );
function rlv_use_yoast_title( $title, $post ) {
    return get_post_meta( $post->ID, '_yoast_wpseo_title', true );
}

4 comments Yoast SEO

  1. I added Relevanssi because my default search engine would only search posts (not articles or pages). Relevanssi does the same thing – my results are only from posts; no pages or articles. How do I tell it to search the whole site? Yes, I did check the boxes for these three items when I created the index.

    1. Relevanssi would search the whole site. If you use the Admin search (Dashboard > Admin search), does that return all kinds of posts? It’s possible your theme is restricting the search results to posts. Does your theme have any settings that could affect this?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.