Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Insert custom styles into landing page custom post types
// 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; }
<?php }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.