Planet WordPress

Serve IE6 Visitors the Default WordPress Theme

Internet ExplorerIt’s been talked about time and time again … what do we do about the IE6 problem?

Of course, there are a couple of options already available to you: you can make IE6 crash when users visit, you can move on to bigger and better things and ignore IE6 altogether, or you can do like I do and display a little message to IE6 visitors encouraging them to upgrade (this plugin makes that pretty easy).

But, if you’re not in the business of pandering to inferior browsers, but you don’t necessarily want to be seen as a jerk, I have a solution that might work out perfectly for you. [Read more…]

Join the Public Developer Beta for the Prodigy Theme

For the last several months, I’ve been quietly developing a theme framework for iThemes — a framework we could use to offer solid code, killer designs, and futureproofing (one of our most common requests at iThemes).

A couple of weeks ago, I invited a few people to join a private beta of the theme (called Prodigy, in case you hadn’t gathered), and it has been silky smooth. Hardly any complaints or bugs, and TONS of compliments. So, I think the theme is ready for a public beta, and you’re all invited!!! [Read more…]

Final Word on WordPress Themes and the GPL?

Matt Mullenweg, the founder and lead developer of the WordPress blogging platform, emailed the Software Freedom Center recently asking about the legality of WordPress themes being licensed under copyright not compatible with the GPL, and they’ve now responded, which Matt has published on the WordPress Development Blog.

The conclusion? The PHP files in WordPress themes must inherit the GPL, but CSS and Images do not. From the email:
[Read more…]

What Do You Want to Know About WordPress?

Over the next few weeks, I want to take reader-submitted questions about WordPress and answer them here on the blog. Have a question about themes? Plugins? Simple or complicated — it doesn’t matter!

If I pick your question, I’ll answer it (in as much detail as necessary) here on the blog, and link to you as the source of the question.

Hopefully this will be a BIG help to everyone out there, and make for some really good conversation! Leave your questions in the comments.

iThemes, WordPress, and the GPL

Since starting iThemes back in early 2008, one thing Cory, and I when I joined the team, were justifiably concerned with was protecting our products, and of course our hard work, from being stolen or used without permission. This was our livelihood, so we couldn’t fool around.

Even though we both believed that we would have been within our rights to copyright the entire work, we decided that we would license all WordPress code in our themes (function calls, loops, etc.) as GPL, and protect our images, stylesheets, etc., under a copyright. We felt it was a good compromise. [Read more…]

An Introduction to WordPress Action Hooks

If you’re going to be doing any level of WordPress development, themes or plugins, you will invariably run into the need to take advantage of the WordPress Action Hook system. But the more I am able to talk to people in the community, the more I realize that people simply don’t understand the concept very well, or at all.

In fact, one of the biggest barriers to using what is referred to as a Theme Framework or creating their own plugins is the fact that they rely heavily on Action Hooks to function properly.

Understanding this concept accelerated my level of development skills immediately after I figured out what hooks were, and how they worked. And today, I want to help you find that path too. [Read more…]

How To Redirect a Page Using Custom Fields in WordPress

Today, I wanted to share a very quick tip that will allow you to insert an internal or external URL in a custom field for a page, and when a user visits that page, they will be redirected to the URL you put in the custom field.

Why would you need to do this? Well, if you want to add a link to your navigation menu, instead of editing code, you could just create a new page, and have that page redirect your users to the URL you specified. I’ve had clients in that situation before, and this code has come in pretty handy for them. [Read more…]

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…]