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

git-svn-id: http://svn.automattic.com/wordpress/trunk@13846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
iammattthomas 2010-03-27 21:50:39 +00:00
parent fca5b63772
commit 45b1a1fe24
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>' ) ); ?>