Tagged: x
-
AuthorPosts
-
November 8, 2016 at 1:44 am #1248297
Hey guys,
In response to this thread: https://community.theme.co/forums/topic/post-title-site-name-on-google/
“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
June 26, 2016 at 7:31 am #1060040JurgaR
This reply has been marked as private.
June 26, 2016 at 7:52 am #1060058Christian
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.”
However, unfortunately the code provided “remove_filter( ‘wp_title’, ‘x_wp_title’, 99 );” does not work. Are there any other solutions?
I am in the same situation as the original poster.
November 8, 2016 at 1:48 am #1248309I’m thinking this may be a solution.
“Search your theme’s files for the title element. This is typically found in the header.php file. Change the title element to just this:
<title><?php wp_title(”); ?></title>”
But I don’t know where to make the change?
November 8, 2016 at 2:20 am #1248338Hi There,
Thanks for writing in! Use this template instead
%%title%% %%page%%
http://image.prntscr.com/image/7876b770fa0c4298bd4fc6c364674a10.png
Hope it helps, Cheers!
November 8, 2016 at 2:59 am #1248373I am already using this….
November 8, 2016 at 3:00 am #1248375Can you tell me where to locate title element as mentioned earlier?
November 8, 2016 at 4:10 am #1248428Hi,
The code is already added in the theme.
You can check in x/framework/views/global/_meta.php
Thanks
-
AuthorPosts