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:

Related Tutorials

One response to “Remove and Replace Child Themes Style Sheet Conditionally”

  1. […] Remove and Replace Child Themes Style Sheet Conditionally […]

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.