Skip to content

Instantly share code, notes, and snippets.

@freezvd
Forked from jamiemitchell/functions.php
Last active August 29, 2015 14:06
Show Gist options
  • Save freezvd/a9433aa3e0ae2ac43a24 to your computer and use it in GitHub Desktop.
Save freezvd/a9433aa3e0ae2ac43a24 to your computer and use it in GitHub Desktop.
<?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