WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 26 of 35

Anatomy of a URL

Sweet little infographic explaining the different parts of a URL (Uniform Resource Locator).

New WordPress plugin: Banhammer!

Quick post to announce my latest WordPress security plugins, Banhammer (free version) and Banhammer Pro. These plugins give you full control over site access, enabling you to warn or ban any user or bot with a click. So you can monitor traffic via slick Ajax UI, and drop the Banhammer on any suspicious or threatening […]

WordPress Check PHP Version

When working with the WP API, you may need to check the current version of PHP to ensure compatibility.

FeedBurner .htaccess redirect

Need to redirect your feeds to FeedBurner? Here’s how to do it with a thin slice of .htaccess.

Instant screenshots of any web page

Here’s a trick to instantly generate a screenshot of anything on the Web. Without a plugin.

Print this JavaScript

You know those “Print this page” links that let you print the whole page? Yeah, those. Here is how to create one of those for your web page using JavaScript and HTML.

Disable theme switching

By default WordPress enables users to switch themes while working in the Admin area. Sometimes a user might screw this up and accidentally activate the wrong theme.

WordPress Prefix Post Titles

A reader recently asked how they can prepend the post date to the post title. Here is a quick and easy way to do it by filtering WordPress’ the_title hook.

Media Temple Server Down

Having issues with Media Temple Grid and DV servers? Losing sales, clients, and business? It’s a depressing, nauseating feeling no doubt. Unfortunately there is not a lot that we, as customers, can do when the servers go down. To help keep your sanity, here is a list of resources for keeping an eye on things, […]

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.

WordPress Set Featured Image with Fallback

In this tutorial, we’ll see how to enable theme support for Featured Images (aka Post Thumbnails), and also how to display them with fallback image support.

Content negotiation for WordPress

Quick PHP script for automatically selecting the best content type based on what the browser accepts. Works as-is for WordPress, or is easily modified to work with any PHP page.