WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Ambrosite Body Class Enhanced

Enhances the body_class template tag, adding some extra classes to the body (post/page slugs, post categories, and archive parent categories) useful i

The body_class template tag is already outputting the post and page IDs. Aren't the slugs redundant?

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.

The post_class template tag is already outputting the category slug. Isn't it redundant to put it on the body as well?

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: 2011-7-3
Downloads: 4,950

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,4,4
100,1,1
100,1,1
100,1,1
100,2,2
100,1,1
100,3,3
100,2,2
100,1,1
100,2,2
100,1,1