Home › Forums › Support › Hide title on custom post type This topic has 5 replies, 2 voices, and was last updated 3 years, 4 months ago by Laurentiu. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts December 26, 2022 at 4:26 am #2473543 Laurentiu I’m trying to hide the title of a custom post type and it is not working. I used the code below, found on this forum: add_action( 'wp', 'tu_disable_cpt_elements' ); function tu_disable_cpt_elements() { if ( 'airfields' === get_post_type() && is_singular() ) { add_filter( 'generate_show_title', '__return_false' ); } } The if is being executed, I added a text after it and it was displayed, but the filter doesn’t seem to be working. December 26, 2022 at 11:59 am #2474041 LeoStaff Customer Support Hi there, Can you try using creating a Layout Element to disable the content title first? https://docs.generatepress.com/article/layout-element-overview/#disable-element The CPT should show in the Display Rules: https://docs.generatepress.com/article/layout-element-overview/#display-rules December 26, 2022 at 1:39 pm #2474119 Laurentiu I did it, but the title is still displayed. I tested deactivating other things, like the header, and it works for other elements but not the title. December 26, 2022 at 1:41 pm #2474121 Laurentiu What is strange is that I disable the title from the edit page, and it still shows up. December 26, 2022 at 2:39 pm #2474148 LeoStaff Customer Support Can you link us to the page in question? December 26, 2022 at 9:47 pm #2474358 Laurentiu Sure, here it is. Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In