Created
April 5, 2013 18:25
-
-
Save scottnix/5321495 to your computer and use it in GitHub Desktop.
Thematic Remove Permalink from Title Filter
This file contains 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
// remove the damn "Permalink to..." that appears on the titles, it is debatable this is bad for SEO's internal linking. | |
function childtheme_postheader_posttitle($posttitle ) { | |
$posttitle = "\n\n\t\t\t\t\t"; | |
if (is_single() || is_page()) { | |
$posttitle .= '<h1 class="entry-title">' . get_the_title() . "</h1>\n"; | |
} elseif (is_404()) { | |
$posttitle .= '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n"; | |
} else { | |
$posttitle .= '<h2 class="entry-title">'; | |
$posttitle .= sprintf('<a href="%s" title="%s" rel="bookmark">%s</a>', | |
apply_filters('the_permalink', get_permalink()), | |
sprintf( esc_attr__('%s', 'thematic'), the_title_attribute( 'echo=0' ) ), | |
get_the_title()); | |
$posttitle .= "</h2>\n"; | |
} | |
return $posttitle; | |
} | |
add_filter('thematic_postheader_posttitle', 'childtheme_postheader_posttitle'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment