Top

ambrosite on "Sidebar Post Archive By Month for Single Category"

April 21, 2010 by  

OK, here it is. This is a bit tricky, but I think it will be easier for you than trying to create custom category templates. Add these lines to the bottom of your CSS file, in this order:

#sidebar { display: none; } /* hide the sidebar on all pages */

body.category-blog #sidebar { display: block; } /* restore the sidebar on the blog index */

Now, if you want the list displayed on each post as well, you’ll need to install a plugin (which I wrote just for this kind of situation):

http://www.ambrosite.com/plugins/body-class-enhanced-for-wordpress

Then add this line to your CSS file (after the other two):

body.single-blog #sidebar { display: block; } /* restore the sidebar on each blog post */

Share

Comments

Facebook comments:

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





*
Bottom