WP-Mix

A fresh mix of code snippets and tutorials

Download large files via SSH

Here is one way to download huge files (or any size file) from your server to your local machine. All you need is an SSH connection and the scp command.

WordPress Comment Anchor Links

Just a head’s up about comment anchor links: they tend to vary a lot from theme to theme, and whether or not there are comments on the post.

WordPress Load Order

Micro-post today, on the load order of WordPress..

Canonical snippets for WordPress

.htaccess enables us to easily clean up 404 errors and other misdirected HTTP traffic for better SEO. Here are some canonical snippets for WordPress and beyond.

Another WordPress Cron Example

Here is another WP Cron example for my previous article on WP Cron tips.

CSS content for list items

Quick snippet for replacing default list-style types (bullets, discs, squares, etc.) with custom generated content in CSS.

WordPress Cron Tips

Here are some quick tips for working with WordPress Cron. The trick to using the scheduling functions is to get the next scheduled cron using wp_next_scheduled().

Redirect HTTP to PHP via .htaccess

Here is how to redirect specific URL requests to a PHP script for further processing, etc. Very useful for monitoring HTTP activity, logging errors, and more.

(More) secure PHP includes

Quick tip for securing your PHP includes, place them above your web-accessible root directory.

Tabbed sidebar menu with jQuery

Here’s an clean, simple way to add a tabbed sidebar menu using jQuery. You can see an example in the Introspection WP Theme.

Set attachment as featured image

Here’s how to set the first attachment as the featured image for posts in WordPress. This is useful for User Submitted Posts, which attaches uploaded images to each submitted post.

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).