Support » Theme: Dazzling » Assigning H1 withouth removing logo

  • Hi,

    Does anyone know how to assign a H1 title in wordpress when the H1 is occupied by the logo, without actually removing the logo?

    The theme takes by default the logo as H1, so the problem is when i simulate the crawling as a google bot (with screaming frog/seoquake) H1 appears empty (which is obvious since crawlers do not read imgs but alts).

    I got the img’s alt ok, but i need the H1 to appear for Seo issues.

    The theme options do not let me modify it.

    Thanks in advance

Viewing 1 replies (of 1 total)
  • since2007


    In header.php there is a check if you’re on the Homepage, then it puts the logo in h1 or else it puts it in a span. Somehow for me it always ends in a span.

    So in your child(!) theme around line 44 change:
    <?php echo is_home() ? '<h1 class="site-title">' : '<span class="site-title">'; ?>
    <h1 class="site-title">

    and around line 59 change:
    <?php echo is_home() ? '</h1>' : '</span>'; ?><!-- end of .site-name -->

    That way the logo always ends up in a h1, even on crawling the site. Hope that’s what you were looking for.

    • This reply was modified 2 months ago by since2007. Reason: typo
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.