Enhances the body_class template tag, adding some extra classes to the body (post/page slugs, post categories, and archive parent categories) useful i
Yes, the post IDs can be used in CSS selectors. However, the slugs are much easier to remember and use. They will also make the CSS file a lot more readable when you come back to it a month or a year later.
Putting the category slug on the body makes it possible to target elements outside of the post div. For example, if you wanted to style the sidebar on a per-category basis (e.g. change it's width for all posts in a certain category, or even hide it completely), you could do it using the body class, but not the post class.
Requires: 2.8 or higher
Compatible up to: 3.2.1
Last Updated: 6 years ago
Active Installs: 1,000+
Got something to say? Need help?