2 min read
Wordpress Plugin: ClassyBody v1.1 Update
ClassyBody v1.1 adds ad-hoc custom CSS classes to the BODY tag, giving designers even more control over the look of each WordPress page.
I have updated my ClassyBody Wordpress plugin to v1.1 with the addition of ad-hoc custom CSS classes.
To recap, my ClassyBody plugin adds contextually intelligent CSS classes to your BODY tag, giving the more high-powered designers out there much greater control of the CSS of a given Wordpress page. It automatically adds CSS classes telling you whether you're on a page/post/archive page/error page and so forth. It even uses CSS "datestamps" (month and year) so you can group posts and/or pages together with a common styling based on age, for example.
So, yeah. It's a powerful little plugin in the hands of a good designer with good CSS skills. People were looking for something like this and it was easy to create as my first ever plugin!
But one thing was missing...
So, I've now updated ClassyBody to Version 1.1 with the addition of ad-hoc custom CSS classes which you can add to any page or post via Wordpress Custom Fields. All you have to do is create a custom field called "classybody" for every post or page to which you want to provide a custom CSS style definition. To keep things clean, ClassyBody will strip out anything that is not a letter, number or a dash ("-"). You may add multiple "classybody" custom fields, or more likely, space-separated class names in the single custom field.
What would you use this for? Whatever you like! You may have a series of posts that are related, and this is the simplest/best way to provide a CSS definition to tie them together. It's really limited to your imagination.
A final note for the techies out there: because the opening BODY tag is outside "the loop", I can't get around the need for one database call, to go get the required custom field information. Alas... you can't have power without burning a tiny bit more energy :)
wordpress, custom fields, css, stylesheets, web design, html, plugin, wordpress plugins, body tag


