Skip to content

Instantly share code, notes, and snippets.

@joshuadavidnelson
Last active December 28, 2015 04:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save joshuadavidnelson/7443705 to your computer and use it in GitHub Desktop.
Save joshuadavidnelson/7443705 to your computer and use it in GitHub Desktop.
Use this code to remove or customize the entry title for a specific post type.
<?php
/**
*
* Remove Links from Post Titles in Genesis
*
* @author Joshua Nelson
* @link http://joshuadnelson.com
*
*/
add_filter( 'genesis_post_title_output', 'jdn_custom_post_title' );
function jdn_custom_post_title( $title ) {
if( get_post_type( get_the_ID() ) == 'post' ) {
$post_title = get_the_title( get_the_ID() );
$title = '<h3 class="entry-title" itemprop="headline">' . $post_title . '</h3>';
}
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment