Category archives: WordPress

Round 2: Preset Widgets to Widget Areas

A while ago, I wrote about how to preset widgets to widget areas (sidebars) in themes, but that method doesn’t work anymore with the new multi-widget implementation. Here’s the new way: Step 1: Add a new instance of the widget to the options table update_option( ‘widget_search’, array( 2 => array( ‘title’ => ” ), ‘_multiwidget’ => 1 ) ... Read More

Introducing The Devel Plugin

Over the years, I’ve built up quiet the library of “mini” plugins that I use during plugin and theme development. They’ve provided me with a ton of value and I’d like to share them with you. But instead of releasing a ton of small mini plugins geared around the same idea, that is, helping out ... Read More

The Comments Loop Widget

Last week I introduced the WordPress Loop widget which received a positive response from the community with over 600 downloads. Today I’d like to introduce it’s companion, the Comments Loop widget. With the comments loop widget, you now have that always-a-hassle-to-create comments.php file completely revamped and widgetized. You can have multiple instances of the comments loop widget ... Read More

The WordPress Loop Widget

WordPress has definitely beefed up support for widgets making it easier than ever to instantiate multiple widgets without too much hassle. I’ve been meaning to build a plethora of features based off the new system. The first on my list was to wigitize the WordPress loop. So here we go… With the WordPress Loop widget, you’ll be ... Read More

Consolidate Options with Arrays in your WordPress Themes

As more and more themes start growing in complexity and features, storing information in the database is a natural progression towards saving any user preferences for that particular theme. In this article we’re going to talk about how you can consolidate all those theme options into a single database entry. Then we’re going to create ... Read More

Smarter Hooks: Contextual Hooks

The article has been updated with a working example on how I’ve implemented the atomic hook approach in WP Framework. It’s also WordPress 2.9 compatible for custom post types and taxonomies. In the last article, we looked at a simple way for making your template files more cleaner and DRY using do_atomic(), a function that registers ... Read More

Smarter Hooks

Now that everyone’s finally understanding the benefits of using theme frameworks and the like, I’m noticing a lot more hooks in themes: theme_before_location(); theme_location(); theme_after_location(); Where location is the location of that particular hook (e.g. header, footer, loop). Now that’s great and all, but here’s a smarter way: do_atomic( ‘location’ ); Where do_atomic is: // Registers three action hooks at once. function do_atomic( ... Read More

On using WordPress Theme Frameworks

In my last post, Kel from BadCat design brought up a very important question about theme frameworks that needs to be discussed: On the same path… If you have a child theme (I’ll use Ian Stewart’s pro/paid Thematic child theme called Power Blog, as the example) and want to customize that – what do you do? ... Read More

About Ptah

I’m a 21 year old web developer, entrepreneur, and founder of Design by Craftsmen, web creative studio specializing in custom WordPress solutions. Get to know me.

Twitter