WordPress.org

Ready to get started?Download WordPress

Forums

Altering <h1> image replacement logo (1 post)

  1. savvy.chick
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic