WP-Mix

A fresh mix of code snippets and tutorials

.htaccess Force GET or POST Requests

Here is how to force all HTTP requests to be either GET or POST. Easy to modify technique can be used for other types of requests as well.

Break Out of Frames

This tutorial explains some ways to use JavaScript to prevent your pages from being framed. Also known as “frame busting” or “breaking out of frames”.

Dealing with translation spam

How I respond to “translation spam”, which happens when greasy organizations ask permission to translate your script, extension, plugin, etc.

Site online but can’t access

Here are a few steps to take if a website is online but you are not able to access it.

Notes on @media queries

Just a couple of notes for working with CSS @media queries: two ways to write media queries and how to query portrait vs. landscape orientation.

PHP Send Bulk Emails from Text File

This post provides a couple of PHP code snippets that enable you to send emails from a text file. Send in plain-text format and plain-text with embedded image.

Combine Audio and Video in QuickTime 7

Quick tutorial showing how to combine audio and video in QuickTime 7 on Mac.

Auto-Focus Form Fields with jQuery

When you load a page that contains a form, it may be useful to automatically place the user’s cursor in the first form field. This post explains how to do autofocus with jQuery.

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.

Basic Code for Image Slider

Here is the basic code required for making a simple image slider. It provides a good starting point for rolling your own sliders, carousels, and so forth.

WordPress Do Stuff on First User Login

Here is a code snippet that runs the first time a user logs in to their registered account. Useful for sending custom welcome emails, or whatever.

jQuery Add Another Image Link

This code snippet is taken from my plugin, User Submitted Posts. It displays a link that users may click to add another file-upload input field.