WP-Mix

A fresh mix of code snippets and tutorials

Get All User Email Addresses in WordPress

Putting together a mailing list? Here is an easy way to get all user email addresses from your WordPress database.

PHP Error Log Tricks

Super useful trick for customizing error logs when working with PHP.

Disable WordPress Automatic Updates

In case you haven’t noticed, WordPress auto-updates its core files by default. Neat but not always desired. Here is how to disable auto-updates with a few lines of code.

Strip Slashes from PHP Magic Quotes

Here are a couple of functions to strip or remove slashes (i.e., backslashes) from variables when PHP magic quotes are enabled on the server.

Using WordPress Filter and Action Hooks

In this tutorial, we have two quick examples showing how to use WordPress filter and action hooks. First we’ll look at how to use filter hooks, and then action hooks.

Date and Time with PHP and WordPress

This post explains the difference between displaying the date and time with PHP vs. displaying the date and time with WordPress.

WordPress Get Category ID from Slug

Quick WordPress snippet for getting the category ID from the category slug.

Limit Characters in WordPress Navigation Links

Here is are two jQuery techniques to limit the number of characters in a string, applied to WordPress navigation links.

Add Custom Info to PHP System Log

Here is a quick function for adding custom information to the system log via PHP.

Convert NEF to JPG

I take a lot of photos and recently started shooting in NEF format (because I bought a Nikon). I like the quality, but had a difficult time (on several occasions) trying to find a way to convert the NEF files to JPG or PNG.

Recursively display images via PHP

Here is an easy way to display all images in a directory — including images contained in sub-directories.

Add links to HTML/CSS Validator

Here are some notes and markup examples for adding links to the W3C’s online HTML and CSS validators. This will enable your visitors to check any page on your site.