Created
June 12, 2013 21:21
-
-
Save facelordgists/5769239 to your computer and use it in GitHub Desktop.
WORDPRESS: Filter Hybrid Entry Titles
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
<? | |
// Filter Hybrid Entry Titles | |
add_filter( 'hybrid_entry_title', 'remove_links_from_headings' ); | |
function remove_links_from_headings($title){ | |
if ( is_single()) { | |
// display H1 tag on single blog posts using the following markup | |
return '<h1 class="page-title entry-title">' . get_the_title() . '</h1>'; | |
} elseif( is_front_page() || is_page() ){ | |
// destroy H1 tag on static home page and all single pages | |
return ''; | |
} else { | |
// otherwise use default markup | |
return $title; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment