A fresh mix of code snippets and tutorials

Triple Loop Navigation

Never thought this was possible, and still don’t know for sure because I haven’t had time to test this code sample found in a pastebin. Included here in its entirety for reference.

.htaccess template file for WordPress

By default, WordPress does not require any .htaccess rules to function properly. But if you want to enable pretty permalinks, a simple set of .htaccess rules must be included in your site’s root .htaccess file.

Secure .svn directories

On most servers, the hidden .svn directories that are used for subversion are hidden and protected by default. If you’re paranoid or unsure of whether or not the svn files are protected automatically, you can use a slice of .htaccess to block all public access.

Deluxe Copyright Dates in WordPress

There are (at least) three ways to display copyright information (date and name) on your WordPress-powered web pages.

Advanced search for custom post types

Setting up custom search forms for custom post types can be tricky business. Here’s a quick & easy guide to make it happen in two steps.

Get the Current URL in WordPress

Quick tip: get the current URL in WordPress:

Update WP plugins via Mac Terminal

Here’s a quick guide for updating your WordPress plugins in the Plugin Directory using Mac Terminal.

Display a custom gravatar in WordPress

Using your own custom gravatars (aka avatars) in WordPress is a piece of cake.

Note about date and time

Just a quick note about how WordPress handles dates and times.

Display all comments on separate page

Normally WordPress themes display comments on the same post or page. WordPress makes it possible to page the comments, so that there are only so many per page, but by default it’s not possible to display all comments on a separate page. Here’s how to do it in three easy steps.

Remove the date from WordPress permalinks

With the rise of the “short URL”, including the date in URLs is no longer considered “cool”, so you may want to “get with it” and dumb down your WordPress URLs to make them shorter. Here is how to use .htaccess to remove the date from your WordPress permalinks.

Query custom post types

Here’s how to query custom post types with WordPress 3 and better.