Skip to content

Instantly share code, notes, and snippets.

@DavidWells
Last active December 24, 2015 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidWells/6814352 to your computer and use it in GitHub Desktop.
Save DavidWells/6814352 to your computer and use it in GitHub Desktop.
Insert custom styles into landing page custom post types
<?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 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment