WordPress.org

Support

Support » Requests and Feedback » Altering <h1> image replacement logo

Altering <h1> image replacement logo

  • Hello lovely forum people. My theme uses CSS Image Replacement to display my logo in the header area. The code that works this magic seems to derive from an <h1> header in ‘header.php’ template, which draws text from my ‘blog name’. This is not ideal for SEO, as I’d like just one <h1> header on each page, drawing text from the ‘title’ of that page.

    I’ve read all around the topic today and cannot figure out the correct code to use. So, I’ve improvised a short-term solution, changing <h1> to <h3>, as follows:

    <h1 id="logo"><a href="<?php echo get_option('home'); ?>/" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
    altered to:
    <h3 id="logo"><a href="<?php echo get_option('home'); ?>/" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h3>

    The site looks okay and is still functional! But I’m dubious that this is the best solution. If anyone could advise a better code and/or way round the problem, I’d be most appreciative.

  • The topic ‘Altering <h1> image replacement logo’ is closed to new replies.
Skip to toolbar