WordPress: Optional Widget Areas

When developing a new WordPress theme, sometimes you might need to create optional widget areas within the template; that is, areas that can include widgets if the user wants, but don’t appear at all if the user has not added any widgets to that particular area.

For instance, some users of your theme might want to include a tag cloud above the footer; or maybe they want to include Google AdSense ads above the content. Other users of your theme might not want anything to appear in those areas, though.

So how do you create an optional widget area in a WordPress theme? The simple answer is, you use the is_active_sidebar() function.

Fill Your WordPress Blog With Fake Content

I realize the concept may seem kind of silly to most people, but I recently needed to fill one of my WordPress sites with a bunch of fake content in order to do some testing. Rather than going through the tedious process of trying to create a bunch of fake posts and pages myself, constantly switching back and forth between lipsum.com and my test WordPress site, formatting the content in different ways; I headed to Google to see what I could find.