Site logo

Archived topic

How to Add A Hook to Post/Category Archive

3 replies · Started by Sam on September 16, 2021

Viewing posts 1–4 of 4

Over time the amount of custom CSS I've added to customizer has grown

I am trying to manage this better by creating a hook for each of following entities - and breaking out the CSS to run only on the pages where its required

- Front Page
- Blog Post
- Pages (other than the front page)
- Category Archives (or which I've have three)

I have managed to create the hooks for everything other than the category archive

The only way i can see to make that one work is by running it against the entire site then excluding; page, front page, blog

It works - but is this the best way?

Thanks

You are welcome :)

This archived topic is closed to new replies.