Home › Forums › Support › Removing title on custom post type This topic has 10 replies, 4 voices, and was last updated 7 years ago by Tom. Viewing 11 posts - 1 through 11 (of 11 total) Author Posts March 10, 2017 at 7:23 am #289751 njwrigley Hi there, I have a Custom Post Type with a slug of “gig”. I’m just wondering what the best way is to remove the display of the post title on the single post page in GP? I don’t want to use a CSS hack ‘display:none’ and wondered if you had any better ideas? Thanks March 10, 2017 at 7:26 am #289758 njwrigley I should perhaps add that I’m playing with Beaver Themer, and so I don’t want to edit a single.php file as Beaver Themer is taking care of the display for me. March 10, 2017 at 9:59 am #289820 TomLead Developer Lead Developer The generate_show_title is the filter you’re looking for: https://docs.generatepress.com/article/generate_show_title/ You could try: add_filter( 'generate_show_title','tu_gig_remove_title' ); function tu_gig_remove_title( $title ) { if ( is_singular( 'gig' ) ) { return false; } return $title; } March 12, 2017 at 9:10 am #290395 njwrigley Yep – that worked a treat! Thanks Tom. March 12, 2017 at 9:13 am #290399 TomLead Developer Lead Developer You’re welcome ๐ March 27, 2017 at 7:48 am #297959 Richard Bland Tom, I am trying to do the same here: add_filter( 'generate_show_title','bb_remove_title' ); function bb_remove_title( $title ) { if ( is_singular( array( 'refurbs', 'yizumi' ) ) ) { return false; } return $title; } This isn’t working for me though. Any ideas? March 27, 2017 at 9:46 am #298008 TomLead Developer Lead Developer Looks good to me. Are you sure refurbs/yizumi are the correct slugs of your custom post types? This function would also on affect the single posts of those custom post types, not the listing/archives page. March 30, 2017 at 12:26 pm #299553 Jamal Hi Tom Struggling with this as well and then i found this answer https://generatepress.com/forums/topic/show-title-filter-is-not-applied/#post-259752 How can i combine the above with this? Thanks ! March 30, 2017 at 4:32 pm #299623 TomLead Developer Lead Developer This should do it: function bb_remove_title( $title ) { if ( is_singular( array( 'refurbs', 'yizumi' ) ) ) { return false; } return $title; } add_action( 'after_setup_theme','tu_after_setup_theme' ); function tu_after_setup_theme() { add_filter( 'generate_show_title', 'bb_remove_title' ); } March 31, 2017 at 2:56 am #299797 Jamal It’s working, thanks Tom ! March 31, 2017 at 9:05 am #299952 TomLead Developer Lead Developer You’re welcome ๐ Author Posts Viewing 11 posts - 1 through 11 (of 11 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In