Tagged: x
-
AuthorPosts
-
June 26, 2016 at 7:30 am #1060038
JurgaRParticipantHi,
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
June 26, 2016 at 7:31 am #1060040
JurgaRParticipantThis reply has been marked as private.June 26, 2016 at 7:52 am #1060058
ChristianModeratorHey 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.
June 26, 2016 at 8:09 am #1060063
JurgaRParticipantThanks 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
June 26, 2016 at 8:22 am #1060075
ChristopherModeratorHi there,
It’s the priority of the function. Default value is 10.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1060038 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
