Okay
  Public Ticket #1177515
Edit header / Yoast SEO plugin
Closed

Comments

  • Jack Macy started the conversation

    It seems that I set the h1 headline tag text for my pages by adding/editing the SEO title for the page. However, I don't want the h1 headline tags on my pages to be the same as the SEO titles. How do I go about editing the h1 text separate from the SEO title?

    Is there another way to edit the h1 text on each page, that is separate from the SEO title text?

    This applies to almost all pages on the site, and I've provided one example.

    Thanks!

  • Jack Macy replied

    To add on to my original question ... ideally, I'd like the 'Post Title' to be used for the h1 text. Is this configurable on my end?

    Thanks.

  •  322
    Support Agent replied

    Hi Jack,

    If you are using Yoast SEO plugin, it does affect the page titles and slugs.

    Should you want your blog titles to be different from the ones for SEO, please consider using All in One SEO Pack plugin, as we know it won't make changes to your titles.

    We're sorry, we're not entirely sure how you want to change header text. Could you explain to us in more detail? Could you send us a screenshot?

    Thank you in advance.

    Regards, BoldThemes team

    If you like our products please consider leaving us a rating. A huge thank you from BoldThemes in advance!

  • Jack Macy replied

    I want the post/page title to be used as the h1 text displayed on each page automatically. I thought that the theme dictates what is used for the h1. Yoast usually doesn't interfere with that.

    How would I edit the theme to pull in the h1 text from the Wordpress post title? Or, where would I find the code that dictates what the h1 text is?

    Thanks.

  • Jack Macy replied

    The theme appears to have the h1 set to use wp_title. I want it to use the_title. In which php template would I edit this? I can't find it.

    thanks for your help!

  •  322
    Support Agent replied

    Hi Jack,

    Unfortunately, the theme doesn't support the option of automatically adding the post title to the header.

    Regarding the Yoast plugin, like we noted, does affect post titles. If you want different SEO titles and post titles, we suggest you use  All in One SEO Pack plugin.

    Thank you for understanding.

    Regards, BoldThemes team

    If you like our products please consider leaving us a rating. A huge thank you from BoldThemes in advance!

  •  2
    Matt replied

    I cannot believe the themes do not offer this as an option. I tried all in one SEO and much prefer to use Yoast. So for now, I have had to change the main theme files to alter the page title. It would be good if we can adjust this in our child theme, but for now, this will have to do!

    Open <theme folder>/framework/boldthemes_functions.php and search for "wp_title". I am using the fast-food theme and this was on line 17. You should also use "get_the_title" rather than "the_title" otherwise it gets send to the browser before the header. 

    $title = is_front_page() ? get_bloginfo( 'description' ) : get_the_title( '', false );

    If anyone can comment how this could be changed without changing the core theme that would be great!

  •  322
    Support Agent replied

    Hi Matt,

    Our theme uses the standard way for retrieving page title - wp_title() function. If you take a look at the the theme's source code - file framework/boldthemes_functions.php you will notice the following line: 

    $title = is_front_page() ? get_bloginfo( 'description' ) : wp_title( '', false ); 

    within boldthemes_header_headline function.

    This means that Yoast uses wp_title filter to modify return value of wp_title function changing it according to meta title defined in Yoast. The problem is not on the side of the theme, but this is the way how Yoast and WordPress api work.

    The following articles might be helpful, should you want to make changes in these functions - Yoast SEO: Titles & Metas template variables and The SEO title output for the plugin doesn’t work as expected.

    Regards, BoldThemes team

    If you like our products please consider leaving us a rating. A huge thank you from BoldThemes in advance!