A compromise approach for #12542 -- Treat site-title as H1 on front page, unless it's a static page.

git-svn-id: https://develop.svn.wordpress.org/trunk@13846 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Thomas 2010-03-27 21:50:39 +00:00
parent 280b71b5e2
commit f654e1a2e6
2 changed files with 12 additions and 2 deletions

View File

@ -30,7 +30,12 @@
<div id="header">
<div id="masthead">
<div id="branding">
<div 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></div>
<?php if ( is_home() || is_front_page() ) { ?>
<h1 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></h1>
<?php } else { ?>
<div 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></div>
<?php } ?>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
<?php

View File

@ -6,7 +6,12 @@
<?php the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php if ( is_front_page() ) { ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>