Created
June 16, 2017 16:23
-
-
Save hellofromtonya/89ec873645f7a34a034cce905e82441d to your computer and use it in GitHub Desktop.
Remove the post title for a custom post type
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
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just replace
'your-custom-post-type-goes-here'
with your custom post type.