I’m using the Canvas theme, and their framework.
I built a child theme and have my custom CSS segregated in a custom.css
file in that directory. I’ve made some changes to one specific page layout file (loop-magazine.php
) to pull posts from a specific category (id=7
) from my database.
I’ve asked Woothemes the following CSS question with no luck with their paid support. Let’s see if any smarties here can make this happen!
I want to hide the post metadata (author
, date
, comments
, etc) on a specific category (id=7
), such that the metadata never displays when those posts are viewed, either in excerpt mode or full-mode.
If hiding this data on a category basis isn’t possible, I’d settle for hiding the meta data anytime this page template (magazine) is used.
My preference is to hide it per the category so that I never worry about that meta data displaying, but I can live with the page approach.
Though I don’t know if that will help much.
Anybody out there used CSS to hide metadata by category?
Posting the answer that was solved by OP in one of the comments. This way it’s easier to read it. Hopefully a moderator can mark the question as solved.
Assuming that you category is ‘services” then;
Or if using LESS
Each category is appended to the class structure of so if category is called ‘dog” it is appended as category-dog.
In your case it is
You could also add in your category template file a code similar to this one:
You would probably need to check for subcategories, but this should get you started if you want to take the PHP approach.