WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 28 of 36

Recursive Download Files with Wget

Quick note for future reference. GNU’s Wget enables you to download files and resources directly via Terminal/shell. The big tip here is the r option, which tells Wget to download the target files recursively. For example, if you want to download an entire site:

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.

Display PHP + server info

Quick snippet today meant as a copy/paste template for displaying your PHP and server information in the blink of an eye.

jQuery Preview Selected Images

This jQuery script displays a live preview of the currently selected images, as selected from a file input field.

Add Tweet-this with jQuery

Quick jQuery snippet today for adding a “Tweet this” button for all of your site’s pages. You can see a demo here at WP-Mix (lower-right corner).

Instant screenshots of any web page

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

Find All URLs in a String with PHP

While developing my WordPress chat plugin, SAC Pro, I needed a way to get all URLs from a string. This enabled me to find any URLs that were included in chat messages, so I could apply HTML formatting and convert the raw URLs into actual clickable hyperlinks.

Create WordPress widgets

WordPress makes it drop-dead simple to create your own custom widgets.

Remove sub-menus

Quick snippet for removing or disabling WordPress sub-menus:

WordPress Navigation Links for Monthly Archives

Archives that are easy to navigate make your WordPress-powered site that much more awesome. There are plenty of great strategies for increasing the usefulness of your post archives. For example, this quick tutorial provides some custom functions that display monthly navigation links. So you can display “Previous Month” and “Next Month” links on monthly archive […]

FeedBurner .htaccess redirect

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

Increase upload limits for WordPress

If you’re encountering restrictive upload limits in WordPress, here is a simple fix: