Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1060038
    JurgaR
    Participant

    Hi,

    I have been using Yoast SEO for a while and one can choose all kind of settings there. One of them is how to show the post title on Google. I have %%title%% as template, but today I noticed that Google also shows my site name, so using %%title%% %%sitename%% template instead.

    I have been looking for answers at Yoast support forums and they seem to say that if the chosen setting is not respected, it has to do with the theme’s compatibility with WP. Here is the article: https://kb.yoast.com/kb/the-seo-title-output-for-the-plugin-doesnt-work-as-expected/

    I’ve tried to add this code into my child-theme’s functions.php , but my site went down so I deleted it again.

    add_theme_support( ‘title-tag’ );

    Another suggestion they give is to edit header.php file with this code: <title><?php wp_title(”); ?></title>
    But that would be overwritten by updates to the theme…

    Are you guys familiar with this issue and do you have an easy fix for it?

    Thanks a lot. Best regards, Jurga

    #1060040
    JurgaR
    Participant
    This reply has been marked as private.
    #1060058
    Christian
    Moderator

    Hey Jurga,

    Please add the code below in your functions.php

    remove_filter( 'wp_title', 'x_wp_title', 99 );

    After that, clear all caches and check if the issue persists. Please take note that search results might take some time to update.

    Thanks.

    #1060063
    JurgaR
    Participant

    Thanks a lot. I did as you said, i.e. add the remove filter code but no other codes as suggested in the other article. Will check with Google in a few weeks to see if anything changed.

    PS what does 99 stand for?

    Best regards, Jurga

    #1060075
    Christopher
    Moderator

    Hi there,

    It’s the priority of the function. Default value is 10.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1060038 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>