WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 2 of 35

WordPress Cron Not Working

Some servers disable the functionality that enables WordPress Cron to work properly. This post provides an easy fix that should work on any server.

Difference between home_url & site_url

Here are some notes to help discern the subtle (and oft-confusing) differences between the WordPress functions, home_url and site_url (and their related “get” functions, get_home_url and get_site_url). We’ll look at the output of these functions and how they relate to the WordPress General Settings.

jQuery Scroll to Target with Offset

This tutorial shows how to create “scroll-to” links with jQuery. For example, if you want to add a link on your page that smoothly scrolls the user to a specific location, add the following code snippet to your JavaScript file.

Redirect URLs with .htaccess

Here is a quick cheat-sheet for redirecting URLs with .htaccess.

Protect Plesk stats

An important aspect of website security is protecting sensitive data such as your server statistics. Here is an important security tip for Plesk users.

Mac Terminal Change to Directory on External Drive

Here is how to cd (change directory) into an external drive using Terminal on Mac computers. The trick is knowing the name of the drive and where it is located. On Macs, all connected drives (including hidden drives) are mounted/located under the /Volumes directory. So we can use this information to get the names of […]

CSS Style Pre Tags

I enjoy writing about HTML pre tags. In this post, I share some basic CSS to help style your pre tags for both screen and print media.

110+ Free Stock Photo Sites

Here is a growing collection of free stock photo sites. Before downloading and using any photos for your project, be sure to check the specific licensing policies of whichever site(s) you are considering. Most everything from the following sites are free and/or open source, but there may be certain exceptions. Make sure to check the […]

Fade in page content with jQuery

Here are two simple techniques to fade in page content with jQuery. The fade-in effect isn’t for everyone, but it’s a nice tool to have in the box.

Font Smoothing in Chrome & Firefox

Working with text in Chrome (and other Webkit-based browser) and Firefox can be frustrating. Depending on context, certain fonts may be displayed weird: too heavy, too fat, too thick, and so forth. So much so that the text can look distorted and difficult to read. Fortunately, we can apply the CSS font-smoothing property to make […]

Getting Path Info with PHP and WordPress

Massive round-up of PHP and WordPress techniques for getting various directory and file path information. This is a mega-reference aimed at PHP/WordPress developers.

WordPress Shortcode Display Search Form

Here is an easy custom WordPress function to display your theme’s search form via shortcode. This makes it easy to display the search form on any Post or Page.