• Resolved swtlbee

    (@swtlbee)


    Hi, I have this function in my functions file –

    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 ); }

    I also checked the DB to make sure the title was being saved correctly to the _yoast_wpseo_title meta field and it is.

    The search results are displaying the post title for all my pages, posts and my landing pages which all start with LP and have checked to make sure the Yoast SEO Title has the field filled in with the correct title.

    Using WPBackery, the7Theme.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    That function only affects the title Relevanssi sees when it indexes the post. Relevanssi doesn’t have any control over that is displayed on your search results page. That’s up to your theme. If you want the search results page to display the Yoast SEO title, you need to modify your search results template to use echo get_post_meta( $post->ID, '_yoast_wpseo_title', true ); instead of the_title().

    Your theme support should be able to help you out with that.

    Thread Starter swtlbee

    (@swtlbee)

    of course… that makes sense. Was not thinking about that. >_<* ugh. thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Results not showing _yoast_wpseo_title’ is closed to new replies.