Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Last active December 26, 2015 02:19
Show Gist options
  • Save jamiemitchell/7078175 to your computer and use it in GitHub Desktop.
Save jamiemitchell/7078175 to your computer and use it in GitHub Desktop.
Add new page title are in Genesis
<?php
/* Add page titles
------------------------------------------------------------ */
add_action('genesis_after_header', 'jm_page_title');
function jm_page_title() {
if (!is_home()) {
echo '<div class="page-title"><div class="wrap">';
if (is_page()) { echo '<h1 class="entry-title">'; the_title(); echo '</h1>'; }
elseif (is_home() || is_single()) { echo '<h2 class="entry-title">'.__('News','jm').'</h2>'; }
elseif (is_search()) { echo '<h2 class="entry-title">'.__('Search','jm').'</h2>'; }
elseif (is_archive()) { echo '<h2 class="entry-title">'.__('Archives','jm').'</h2>'; }
elseif (is_404()) { echo '<h2 class="entry-title">'.__('Page not Found!','jm').'</h2>'; }
echo '</div></div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment