WordPress append page slug to body class

Styling different pages in WordPress is a relatively easy process if you make use of the default body classes that are made available to you, especially the unique page ID class “page-id-123“.

The problem with using the ID class to identify an individual page is that a page ID can quite easily change when working with a development version or even migrating your blog from one install to another. Continue reading “WordPress append page slug to body class”

How to remove the Admin Bar in WordPress 3.1 correctly

Although the WordPress Admin Bar can be hidden by a user visiting their profile page in the Admin Panel (Users > Your Profile), there may be a situation where you want to force the removal without instructing the user to amend their settings or updating their settings automatically.

When the issue of removing the Admin Bar first cropped up, the solution was to remove the associated init action, however this is not the correct method of disabling it and should not be used. Continue reading “How to remove the Admin Bar in WordPress 3.1 correctly”