5 Useful WordPress Functions You Didn’t Know Existed

Deep within the source code of WordPress lies an endless list of useful functions just waiting for you to use them in your theme or plugin. The problem is, most people don’t know they exist, probably because the Codex is ridiculously underdeveloped, and most people hate looking through source code. Luckily for you, reading the WordPress source code is a hobby of mine.

So, I compiled a list of some of my favorites. Some are simple and can be used by pretty much everyone; others have less common uses; but, all of them are incredibly useful. Read More

Browser Detection and the body_class() Function

Yesterday, I wrote an article introducing and unwrapping the new WordPress body class function that will be included in WordPress 2.8. Today, I want to take it a step further by giving you a practical example of how you you can use the function to make things easier for yourself.

One of the more frustrating things about coding for the web is the fact that different browsers often render the same code differently than one another. Wouldn’t it be nice if we could apply certain CSS styles to just the browsers that need it? With the new body_class() function, and a little code magic on our part, and you’ll be able to do just that.

It should be noted that this article will be a bit more involved than some of the others on this site. There will be a lot of assumptions made about your level of coding experience.

Read More

WordPress 2.8 and the body_class() Function

Back on February 7th, I was casually browsing the WordPress trunk code, and discovered a very cool new function in the wp-includes/post-template.php file.

Beginning in WordPress 2.8, themes will be able to take advantage of the body_class() function to place location-specific classes on the opening <body> tag, usually located in the header.php file of most themes.

Why is this significant? Easy … this opens up the ability to change the look of nearly everything with CSS only.

Before we get into the application of the body_class() function, let’s cover some technical details first. Read More

3 New Plugins by Yours Truly

That title couldn’t be worse for my WordPress SEO goals, but it’s late and I don’t care!

Over the last several weeks, I’ve been a busy working on a few little gems that you might find useful.  I certainly do.

I’ve created a new WordPress Plugins page here as a placeholder. Eventually, each plugin will have its own page.  Check them out and let me know what you think.