Last active
December 26, 2015 02:19
-
-
Save jamiemitchell/7078175 to your computer and use it in GitHub Desktop.
Add new page title are in Genesis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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