Insert Custom CSS into All Landing Page Custom Post Types

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?php
// Insert Custom Styles on all landing pages. Insert in themes function.php file
add_action( 'wp_head', 'custom_landing_page_styles' );
 
function custom_landing_page_styles() {
global $post;
if (isset($post)&&$post->post_type=='landing-page') { ?>
 
<style type="text/css">
/* Your Landing Page Specific CSS here */
#css_selection { display: none !important; }
</style>
<?php }
}