Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #367043

    We have a static homepage setup within WordPress and we just installed the Yoast SEO plugin on our site. The site is now displaying SITE TITLE | HOMEPAGE TITLE (which are both named the same, so we get duplication…).

    I searched through the forums here and found this code (which was posted in another thread about a similar issue…):

    add_filter('avf_title_tag', 'avia_change_title_tag', 10, 2);
    function avia_change_title_tag($title, $wptitle)
    {
    return $wptitle;
    }

    We placed the code at the bottom of functions.php — however it doesn’t seem to have changed anything for us… Basically we just want to remove the Homepage Title, so that its simply SITE TITLE when on the homepage…. is this possible?

    THANKS!!

    • This topic was modified 9 years, 11 months ago by SobeIT.
    #367361

    Hey SobeIT!

    Navigate to Dashboard > SEO > Titles & Meta > Homepage and set the title there. If you have a page set to display as your frontpage in Dashboard > Enfold > Theme Options then you’ll need to set the title when editing that page instead.

    Best regards,
    Elliott

    #367389

    Thank you for your reply Elliott,

    Yes, my homepage is set to display as my front page in Dashboard > Enfold > Theme Options… so I have also tried when editing the page.

    Here is what happens:

    1. If you set the Site Title in Settings > General and on the (home) page itself then it duplicates as “Page Name | Site Name”.
    2. Removal of the Site Title in settings produces “Page Name |” (the vertical bar after being the problem now).
    3. Replacing the Site Title in settings and removal of the page name itself produces “| Site Name” (again vertical bar problem now before).

    You can goto SEO > Titles & Meta > Pages and edit the title configuration… however then that messes up all of the other pages too (which are currently fine, problem is with the homepage). It seems as if there is no way to actually remove the Homepage page title?

    If on the homepage I am looking for….. “Site Name” when navigating to other menus I want “Page Name | Site Name” (which is what it does, its simply the homepage that is broken).

    I can remove the Site Name and then remove the Vertical Spacer ” | ” within Yoast and it works… but then is there another way to add the spacer to the other pages which need it? So that they are not simply “Page Name Site Name” with no spacer?

    #367661

    Hi!

    Try to disable the title & meta settings or reset it to default then add this on functions.php:

    add_filter('avf_title_tag', 'avia_change_title_tag', 10, 2);
    function avia_change_title_tag($title, $wptitle)
    {
    if(is_front_page()) { 
    $title = get_bloginfo('name');
    }
    return $title;
    }
    

    Regards,
    Ismael

    #367682

    Ismael that did the trick!!! THANK YOU so much! Everything is perfect now.

    #368078

    Hi!

    Glad we could help. :)

    Cheers!
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Duplicated Titles w/ Yoast SEO Plugin’ is closed to new replies.