• I just discovered that (except for the homepage) all pages do have2 H1 Tags. This is an absolute NoGo for SEO: as a result of this only the home page is not being penalised in the Google & Bing search results.

    For the non-homepages, the site-title and the post- or page-title ar configured as H1.

    From the Webdesigner and SEO point of view the only acceptable solution for this is:

    1. the site-title stays as H1 for the home page
    2. on all other pages and posts the site title is not allowed to have an H1, H2, H3, …. at all. (Because the structure of the Headings must be in a logic sequence). You dare not start with an H2 followed by an H1)

    For keeping this theme (which I really apreciate and am using for over 5 years) competitive to others, it would be the best solution to solve this in the theme itsself. But as a temporary solution providing me/us a hook, is for me personal OK too.

    FYI:

    Before starting this thread, I read to other closed threads that treated the same problem and where a solution was offered by making the site-title as H2. I hope I was clear eough that this is not a good solution.

    And neither a good solution would be to remove the sitetitle H1 of the home page because we must – in most cases – then repeat the header as the page title for the ho?e page to get an H1. Which is as design awfull/non-professionak and visitor unfriendly. However, for this specific issue a workaround might be possible by providing a page with page-title hided.

    Thanks in advance for treating this problem!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Patrick Mortier

    (@ega039)

    About the workaround option with the page title hided: not only the title must be hided, the title is (in this case as the homepage title) not allowed to get an H tag in the code at all.

    Hi @ega039,

    Perhaps you theme’s files have changed. Please check this file sydney/inc/classes/class-sydney-header.php, and locate to site_title_desc() function:

    /**
    * Site title and description
    */
    public function site_title_desc() {
    if ( is_front_page() && is_home() ) :
    ?>
    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    <?php
    else :
    ?>
    <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
    <?php
    endif;
    $sydney_description = get_bloginfo( 'description', 'display' );
    if ( $sydney_description || is_customize_preview() ) :
    ?>
    <p class="site-description"><?php echo $sydney_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
    <?php endif;
    }

    Does this code in your file look exactly like this? Please confirm.

    Thread Starter Patrick Mortier

    (@ega039)

    Hi @kharisblank,

    Thanks for replying! I have checked on a few sites. And no this file is completely different. It is a php file with a lenght of 664 lines, starting with:

    <?php
    /**
    * Header class class
    *
    * @package Sydney
    */

    if ( !class_exists( 'Sydney_Header' ) ) :
    Class Sydney_Header {

    /**
    * Instance
    */
    private static $instance;

    /**
    * Initiator
    */
    public static function get_instance() {
    if ( ! isset( self::$instance ) ) {
    self::$instance = new self;
    }
    return self::$instance;
    }

    /**
    * Constructor
    */
    public function __construct() {

    Thread Starter Patrick Mortier

    (@ega039)

    Sorry for my former reply! I did not understand that I had to go into that file and look into the code for that specific function. Which I did in the mean time…

    The code is exactly the same as in your former reply. This is what I have found:

        /**
         * Site title and description
         */
        public function site_title_desc() {
            if ( is_front_page() && is_home() ) :
                ?>
                <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                <?php
            else :
                ?>
                <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                <?php
            endif;
            $sydney_description = get_bloginfo( 'description', 'display' );
            if ( $sydney_description || is_customize_preview() ) :
                ?>
                <p class="site-description"><?php echo $sydney_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
            <?php endif;
        }       

    Hi @ega039,

    Your shared code looks fine. And there should be no issue with H1 tag duplication.

    Here is video recording of my testing while running latest version of Sydney theme: https://drive.google.com/file/d/12kufDav8LOu2BF21e9xDvg6hDTF5lyIo/view?usp=sharing

    Could you try to reinstall Sydney theme and see if this resolves your issue?

    Thread Starter Patrick Mortier

    (@ega039)

    Hi @kharisblank,

    Thanks a lot for your reply and video. After executing your advices, the problem was solved. Which made me recheck the behaviour with the child theme activated. And… as soon as I reactivated the child-theme, the problem reappeared. But this made a 100% clear that the problem was not in the mother theme.

    I thought that I had checked this, before I opened this thread. Appearently not or not thorougly or I must have been confused not having seen it was in the due to the child theme?!

    So I have to make apologies and a big thank you for your efforts! And thank to your colleages for this amazing theme and support.

    Thread Starter Patrick Mortier

    (@ega039)

    Closing the thread.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.