New heading structure - redux of #651. Provides proper semantic structure for titles throughout theme:

In header.php: Site title set to H1 on front page, div on other pages
In functions.php: Widget title set to H2 for semantic hierarchy
In content-search.php and content.php: Heading set to H2 as page title is "Search" or "Archive title" etc.
This commit is contained in:
Morten Rand-Hendriksen 2015-06-28 12:06:02 -07:00
parent 5bb0534358
commit dc6d3fa08c
4 changed files with 9 additions and 5 deletions

View file

@ -24,7 +24,11 @@
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<div class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></div>
<?php endif; ?>
<p class="site-description"><?php bloginfo( 'description' ); ?></p>
</div><!-- .site-branding -->