Home › Forums › Support › Simple CSS and post types This topic has 3 replies, 2 voices, and was last updated 1 year, 8 months ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts October 28, 2020 at 2:27 pm #1508548 Ash Question about Simple CSS plugin but GeneratePress. Is there a way to enable Simple CSS metabox on certain post types? i.e. only on Pages. There are many post types I don’t need Simple CSS metabox. October 29, 2020 at 9:57 am #1509888 TomLead Developer Lead Developer Hi there, You could try something like this: add_action( 'add_meta_boxes', function() { $post_types = get_post_types(); foreach ( $post_types as $post_type ) { if ( 'page' !== $post_type ) { remove_meta_box( 'simple_css_metabox', $post_type, 'normal' ); } } }, 20 ); Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development October 29, 2020 at 2:45 pm #1510212 Ash Thank you! October 30, 2020 at 10:53 am #1511474 TomLead Developer Lead Developer You’re welcome 🙂 Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In