DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Declare Multiple Widgetized Areas

Posted by on

Have a bunch of different areas you wish to declare as a widgetized area? Save repetative code by creating a quick array of their names, then loop through that array calling the register_sidebar() function on each one. Elementary PHP stuff here, but hey, it just saved me quite a few lines of code in a widget-heavy theme I am working on.

WordPress Admin Bookmarklet

Drag to your bookmarks bar, click, get a bunch of buttons for easy access to specific areas of your WordPress admin. No security concerns, other than taking people to your log in page, so assuming you have a good strong password you are fine. Also I suppose this assumes you have WP installed at the root…

5 tips for using AJAX in WordPress

WordPress has a bunch of AJAX abilities built in that you can access, without having to use any outside resources. Gary Cao shows how, pointing out good and bad practices.

Update: (404 link removed 2013/11/20)

WordPress vs. ExpressionEngine: Apples and Oranges?

Marcus Neto attempts to compares the two CMSs while explaining why he likes ExpressionEngine. Are they really apples or oranges? I suppose you could say that. Apples and oranges are both popular spherical fruit. They have more in common than theyhave different. Same with the two CMSs.

While I’m 98% a WordPress guy, there are a few circumstances I might take the EE route, like when:

  1. I knew I was going to need a whole bunch of different custom data types and groups and didn’t feel like dealing with the whole Pods or Flutter setup.
  2. I also knew no newbie client was going to need to get in there.

Shortcodes in Widgets

Posted by on

I had occasion the other day to run a shortcode inside of a text widget. You know shortcodes… we talk about them all the time. They are keywords in [square brackets] that do something special. Sometimes something really simple like returning a string (so you can have a global location to change that string) or something complicated like call a plugin that does something fancy like build a photo gallery.

How to Add Your Plugin to the WordPress Plugin Directory

Posted by on

Getting your plugins listed in the official WordPress Plugin Directory is considered a chore by many, but it’s nothing that should stop you from sharing your plugin with the community at large. Up until now, I haven’t really bothered with adding my plugin collection to the Directory, but after Herb Goodman helped to package my recent Block Bad Queries plugin, I figured now was a good time to dig in and learn the ropes. It turns out the process only took about an hour to complete, not including the waiting period for access to the Subversion Repository (which was about 18 hours). Definitely worth the potential exposure provided by having your plugin listed in the official directory.

PubSubHubbub Now On All WordPress.com sites (+ plugin for self hosted sites)

This is me trying to understand it:

Instead of services that read your feeds (e.g. Google Reader) having to ASK for your feed periodically, now they can instead just wait until YOUR SITE notifies THEM. Basically a “push” service.

It seems to me this is half the equation. The other half is building services that accept these push notifications. I’m not sure who is already doing that, but I wouldn’t be surprised if Google is on it, since it seems like a more efficient way of doing things on both sides (less server resources on both sides).

Two concerns I can think of:

  1. Is this just as reliable as the “old” way? People not getting feed updates because of a hiccup in the chain sucks for everyone.
  2. This makes “accidentally” hitting that publish button potentially even more embarrassing than it already can be. Like when you accidentally publish a post instead of a page.

Also check the overview slideshow here.

Add Link to Favorites Dropdown

This is basically a smarter way to handle the situation I just posted about. Using a function to manipulate the favorites dropdown instead of a core hack.

Update: (404 link removed 2014/04/29)

Change Quick Action Button in Admin

Posted by on

You know the “quick action” button in the WordPress admin? It’s a darn useful little UI touch. At the Dashboard, the default is “New Post”. But depending on where you are in the Admin, the default of it changes. In general it’s really helpful. For example when you are in the Plugins area, the default is Install Plugins:

Digging Into WordPress v2.0 + Print is Back! (Oh, and a fresh new design!)

Posted by on

Version 2.0 is here! If you have already purchased the book, you have already gotten an email with a link to download the 2.0 version of the book. If you have been waiting for the print version to come back in stock, the time is now!

We sold out of the print version the first round in a matter of weeks. Right about that time, WordPress 2.9 was coming out, so instead of just reprinting more we decided to update the book and print new copies with that fresh information. That is exactly what we have done. The all-new Chapter 11 of the book deals with new stuff in WordPress 2.9 (and how to use the new features). That chapter will also be the home for future version-specific updates to WordPress.

Read on to find out more about the book. Oh and by the way, we’re sporting a fresh new design here on the site. What do you think?

Code is poetry