Home › Forums › Support › Remove Page Header support from CPT This topic has 5 replies, 2 voices, and was last updated 6 years, 7 months ago by Tom. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts August 17, 2017 at 5:41 pm #368375 wekhter I love the page header addon for pages, but the options show up on all of my CPTs, where it doesn’t need to be and clutters up the post editor. Any way to disable it on all but pages (and archives)? August 17, 2017 at 5:49 pm #368379 TomLead Developer Lead Developer Hi there, You could try this: add_action( 'add_meta_boxes', 'tu_remove_cpt_page_header_metabox', 100 ); function tu_remove_cpt_page_header_metabox() { $post_types = get_post_types( array( 'public' => true ) ); foreach ( $post_types as $type ) { if ( 'page' !== $type ) { remove_meta_box( 'generate_select_page_header_meta_box', $type, 'normal' ); } } } August 18, 2017 at 9:49 am #368792 wekhter @Tom No such luck, the page header metabox still appears on all CPTs (for instance, WooCommerce products) August 18, 2017 at 11:51 am #368849 TomLead Developer Lead Developer I just adjusted the code above: https://generatepress.com/forums/topic/remove-page-header-support-from-cpt/#post-368379 Let me know if it works now π August 18, 2017 at 1:44 pm #368912 wekhter @Tom Thanks, all good now! π August 18, 2017 at 1:48 pm #368919 TomLead Developer Lead Developer You’re welcome π 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