WP Kode

Tips, code snippets and a bunch of stuff for WordPress

Tag: body_class

An even better body_class for WordPress

Here is a little update to my better body_class code: So what does this thing do? It adds a the slug of the current page to the class just like the old one but it also combines Nathan Rice code for browser detection with even a little extra class called notie a.k.a. Not Internet Explorer. [...]

A better body_class for WordPress 2.8

WordPress 2.8 introduced a very useful new tag called body_class which normally will be used like this: The only problem is that it uses the ID’s instead of the page slugs making it a little harder to use the classes on your CSS (or Javascript). A very easy way to fix this is to call [...]