• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2762

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Premium Access
  • Log in

Remove and Replace Child Themes Style Sheet Conditionally

If you want to remove the entire style sheet in your child theme from working conditionally, you can using the code in this tutorial.

An example would be removing the default child themes style sheet from working on 1 specific single post. This way you can style the post differently to all other posts.

  • Or, you could remove the style sheet from all posts,
  • Or, all posts in specific categories
  • Or, all archives.

Whatever conditional tag you use with this code will determine which style sheet is used. The default child themes style sheet or custom style sheet you add in your child theme.

Works with any theme.

Here’s the code:

Register for full access

Related Tutorials

  • How To Deregister & Dequeue Style Sheets
  • How To Add A Second Style Sheet In Your Theme
  • Style Your Plugin Via Your Theme

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting