WordPress.org

Make WordPress Core

Changeset 13846


Ignore:
Timestamp:
03/27/2010 09:50:39 PM (11 years ago)
Author:
iammattthomas
Message:

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

Location:
trunk/wp-content/themes/twentyten
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/header.php

    r13836 r13846  
    3131        <div id="masthead">
    3232            <div id="branding">
    33                 <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>
     33                <?php if ( is_home() || is_front_page() ) { ?>
     34                    <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>
     35                <?php } else { ?>   
     36                    <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>
     37                <?php } ?>
     38               
    3439                <div id="site-description"><?php bloginfo( 'description' ); ?></div>
    3540
  • trunk/wp-content/themes/twentyten/page.php

    r13818 r13846  
    77
    88                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    9                     <h1 class="entry-title"><?php the_title(); ?></h1>
     9                    <?php if ( is_front_page() ) { ?>
     10                        <h2 class="entry-title"><?php the_title(); ?></h2>
     11                    <?php } else { ?>   
     12                        <h1 class="entry-title"><?php the_title(); ?></h1>
     13                    <?php } ?>             
     14
    1015                    <div class="entry-content">
    1116                        <?php the_content(); ?>
Note: See TracChangeset for help on using the changeset viewer.