Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-03-2012, 03:09 AM #1
- Join Date
- Mar 2012
- Thanked 0 Times in 0 Posts
Best way to update a nested template-specific class
I'm working on a WordPress site right now and I want to style post meta data differently on a category archive page as opposed to a single post page. They are both using the entry-date class but the body that is called is different between the archives and single post.
Here is how the classes and IDs are nested for the archive page:
<body class="archive category category-blog category-11 logged-in admin-bar browser-gecko"> <div id="page" class="hfeed container"> <div id="main" class="clearfix"> <div id"content" class="sidebar" role="main"> <div class="entry-content"> <span class="entry-meta"> <span class="entry-date">
<body class="single single-post postid-191 single-format-standard logged-in admin-bar browser-gecko">
How do I add template-specific CSS so that my entry-date styling only affects the pages using body.archive? I've experimented with different nesting techniques but I'm not having any luck.
I would link the site but the WP site is hidden to the public until launch. Thanks for your input!
05-03-2012, 02:58 PM #2
- Join Date
- Feb 2009
- Ilkley, West Yorkshire, UK
- Thanked 724 Times in 718 Posts
This is straightforward: