Home › Forums › Support › Remove Archive Title on Custom Post Type This topic has 5 replies, 2 voices, and was last updated 3 years, 2 months ago by David. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts February 15, 2023 at 6:52 am #2534103 Rostyslav Hello, I have created a CPT and added a design element to disable a title in Archive and Taxonomy but it doesnt work. How can I remove that titles. I want to create a custom layout for that Archives. Thanks https://ibb.co/Lv17md8 February 15, 2023 at 8:31 am #2534372 DavidStaff Customer Support Hi there, try this PHP Snippet: add_action('wp', function(){ if ( is_post_type_archive( 'my_custom_post_type' ) ) { remove_action( 'generate_archive_title', 'generate_archive_title' ); } }); change the my_custom_post_type to your CPT slug February 15, 2023 at 8:45 am #2534399 Rostyslav Hello! How can I also add the CPT taxonomies (categories in CPT) in that php? I also want to remove taxonomy title. Thanks February 15, 2023 at 9:44 am #2534456 DavidStaff Customer Support You can is the is_tax template tag: https://developer.wordpress.org/reference/functions/is_tax/ eg, add_action('wp', function(){ if ( is_post_type_archive( 'my_custom_post_type' ) || is_tax('my_tax_slug') ) { remove_action( 'generate_archive_title', 'generate_archive_title' ); } }); February 15, 2023 at 10:10 am #2534484 Rostyslav GENIUS! February 16, 2023 at 4:57 am #2535361 DavidStaff Customer Support Glad to be of help 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