How to set dynamic body IDs/classes in WordPress
Perishable Press lists 9 different ways you can “label” your <body> element using PHP and WordPress—very useful for development themes with special features depending on where you are in a WP site. A lot of them are derived from theme development experts and popular theme frameworks like the WordPress Sandbox.
The 9th way must be mentioned here: when WordPress 2.8 comes out, things will become much easier since it now has the body_class() function. More info about that here (since there’s no page on the Codex for it yet).
Related Posts
- Previous post: How to create Widgets in WordPress 2.8
- Next post: 7 reasons to get excited over WordPress 2.8



