WordPress.org

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.

Add URL Slugs as Body Classes

Add URL Slugs to `body` Class

This plug-in takes the URL, chops it into pieces, and adds each "piece" as an additional class to the body tag.

Meaning, if your page's URL is: http://aarontgrogg.com/2012/02/24/wordpress-plugin-add-url-slugs-as-body-classes/ Your page's body tag would have at least these classes:

2012 02 24 wordpress-plugin-add-url-slugs-as-body-classess

It gets much stronger when you start thinking about Categories or nested Pages:

http://aarontgrogg.com/category/wordpress/

which would give you:

category wordpress

while:

http://aarontgrogg.com/movies/star-trek/wrath-of-khan/

would give you:

movies star-trek wrath-of-khan

Please let me know if you have any questions/suggestions/thoughts, Atg http://aarontgrogg.com/ aarontgrogg@gmail.com

Tags: ,

Requires: 3.1 or higher
Compatible up to: 3.5.2
Last Updated: 2013-1-11
Active Installs: 500+

Ratings

4.7 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