• I display my site title in an H1 tag on my homepage.

    In my other pages I would like to display this same title in a paragraph tag and not a H1 tag, so I can make better use of a single H1 elsewhere in the page (trying to limit 1 h1 per page for seo).

    Is this possible?

Viewing 1 replies (of 1 total)
  • look into header.php of Twenty Ten for some example code:

    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
    				<<?php echo $heading_tag; ?> id="site-title">
    					<span>
    						<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
    					</span>
    				</<?php echo $heading_tag; ?>>

    if you have problems adapting it to be used in your theme, please post here again.

Viewing 1 replies (of 1 total)
  • The topic ‘Display different logo if current page isn't the homepage?’ is closed to new replies.