H1 title of post - by manuelalexcruz - on WordPress WooCommerce support

This topic has 5 replies, 4 voices, and was last updated 5 years, 6 months ago ago by Rose Tyler

  • Avatar: manuelalexcruz
    manuelalexcruz
    Participant
    October 27, 2018 at 22:42

    Hello, is it possible to make the h1 of the posts the title of the post?

    4 Answers
    Avatar: thisisbolo
    thisisbolo
    Participant
    October 28, 2018 at 01:10

    Hi – I just noticed this and will guide you on how to fix this. Follow these steps (and thanks for pointing this out).

    Go to the xstore theme folder and copy the ‘single.php’ file into your xstore-child folder
    Open this file in a text editor and find this line of code

    <?php if ( etheme_get_option( 'single_post_title' ) ): ?>
         <h2><?php the_title(); ?></h2>
         <?php etheme_byline(); ?>
    <?php endif ?>
    

    There’s another instance of <h2><?php the_title(); ?></h2> you’ll also want to change. You’ll see it in the code.

    Change <h2><?php the_title(); ?></h2> to <h1><?php the_title(); ?></h1>

    Voila. Now h1 of the posts will be the title of the post just as you wanted.


    @8theme
    – We should probably update this in the next release. This is an integral part of SEO, especially for posts.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    October 29, 2018 at 19:05

    Hello, @manuelalexcruz

    You can use the solution from @thisisbolo if you don’t use the breadcrumbs on the post. In other cases, you need to change the breadcrumbs title tag to different than <h1>. So, could you explain me in details why do you want to change that tag and provide me the link to post/page where you want to change it to check the structure for the correct answer?


    @thisisbolo
    by default we use <h1> tag for the post/page/product title in the breadcrumbs, we can’t use two <h1> tags on the page that’s why post title in content has <h2> tag.

    Regards

    Avatar: thisisbolo
    thisisbolo
    Participant
    October 29, 2018 at 19:09

    @olgabarlow You are right! The h1 tag is in the breadcrumbs. Can’t believe I overlooked that. Duh!

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 30, 2018 at 08:16

    Hello @thisisbolo,

    Thank you for the reply. Let us know if you need any assistance.

    Regards

  • Viewing 5 results - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.