Skip to content

Instantly share code, notes, and snippets.

@jonschr
Last active October 19, 2015 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonschr/ad0e91b053dc01fe2f35 to your computer and use it in GitHub Desktop.
Save jonschr/ad0e91b053dc01fe2f35 to your computer and use it in GitHub Desktop.
Remove Genesis title links (conditionally, for functions.php)
<?php
//* Do not include the opening php tag
//* Remove the link from titles
add_filter( 'genesis_post_title_output', 'prefix_custom_post_title' );
function prefix_custom_post_title( $title ) {
if ( is_post_type_archive( 'post' ) ) {
$post_title = get_the_title( get_the_ID() );
$title = '<h2 class="entry-title" itemprop="headline">' . $post_title . '</h2>';
}
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment