Skip to content

Instantly share code, notes, and snippets.

@hellofromtonya
Created June 16, 2017 16:23
Show Gist options
  • Save hellofromtonya/89ec873645f7a34a034cce905e82441d to your computer and use it in GitHub Desktop.
Save hellofromtonya/89ec873645f7a34a034cce905e82441d to your computer and use it in GitHub Desktop.
Remove the post title for a custom post type
add_filter( 'genesis_post_title_output', 'remove_single_custom_post_titles' );
/**
* If this is a single dogs post type, return nothing
* to remove the title from the web page.
*
* @since 1.0.0
*
* @param string $title The Post's Title
*
* @return string
*/
function remove_single_custom_post_titles( $title ) {
if ( ! is_singular( 'your-custom-post-type-goes-here' ) ) {
return $title;
}
}
@hellofromtonya
Copy link
Author

Just replace 'your-custom-post-type-goes-here' with your custom post type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment