Ticket #12542: theme_h1_and_title_fixes.diff
| File theme_h1_and_title_fixes.diff, 3.0 KB (added by , 16 years ago) |
|---|
-
functions.php
257 257 } 258 258 endif; 259 259 add_action( 'init', 'twentyten_widgets_init' ); 260 261 function is_root_page() { 262 return (is_front_page() || (is_front_page() && is_home())); 263 } 264 function the_header_title_element() { 265 echo (is_root_page() ? 'h1' : 'div'); 266 } 267 No newline at end of file -
onecolumn-page.php
12 12 <?php the_post(); ?> 13 13 14 14 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 15 <?php if (!is_root_page()): ?> 15 16 <h1 class="entry-title"><?php the_title(); ?></h1> 17 <?php endif; ?> 16 18 <div class="entry-content"> 17 19 <?php the_content(); ?> 18 20 <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>'); ?> -
page.php
6 6 <?php the_post(); ?> 7 7 8 8 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 9 <?php if (!is_root_page()): ?> 9 10 <h1 class="entry-title"><?php the_title(); ?></h1> 11 <?php endif; ?> 10 12 <div class="entry-content"> 11 13 <?php the_content(); ?> 12 14 <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>'); ?> -
header.php
3 3 <head> 4 4 <meta charset="<?php bloginfo('charset'); ?>" /> 5 5 <title><?php 6 if ( is_single() ) {6 if ( is_single() ) { 7 7 single_post_title(); echo ' | '; bloginfo('name'); 8 } elseif ( is_home() || is_front_page() ) {9 bloginfo('name'); echo ' | '; bloginfo('description'); twentyten_the_page_number();8 } elseif ( is_root_page() ) { 9 bloginfo('name'); echo ' | '; bloginfo('description'); twentyten_the_page_number(); 10 10 } elseif ( is_page() ) { 11 11 single_post_title(''); echo ' | '; bloginfo('name'); 12 12 } elseif ( is_search() ) { … … 25 25 <?php wp_head(); ?> 26 26 </head> 27 27 28 28 29 <body <?php body_class(); ?>> 29 30 <div id="wrapper" class="hfeed"> 30 31 <div id="header"> 31 32 <div id="masthead"> 32 33 <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>34 <<?php the_header_title_element(); ?> 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 the_header_title_element(); ?>> 34 35 <div id="site-description"><?php bloginfo( 'description' ); ?></div> 35 36 36 37 <?php … … 49 50 </div><!-- #header --> 50 51 51 52 <div id="main"> 53 54 <?php 55