Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1248297

    Razorsharp_
    Participant

    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 #1060040

    JurgaR

    This reply has been marked as private.
    June 26, 2016 at 7:52 am #1060058

    Christian

    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.

    #1248309

    Razorsharp_
    Participant

    I’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?

    #1248338

    Friech
    Moderator

    Hi There,

    Thanks for writing in! Use this template instead %%title%% %%page%%

    http://image.prntscr.com/image/7876b770fa0c4298bd4fc6c364674a10.png

    Hope it helps, Cheers!

    #1248373

    Razorsharp_
    Participant

    I am already using this….

    #1248375

    Razorsharp_
    Participant

    Can you tell me where to locate title element as mentioned earlier?

    #1248428

    Paul R
    Moderator

    Hi,

    The code is already added in the theme.

    You can check in x/framework/views/global/_meta.php

    Thanks