WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 34 of 36

Truncate Database Table

Quick SQL code snippet that enables you to truncate any MySQL database table.

Nice little input button with CSS

Just making a note of the CSS used to make a nice little input button, leftover snippet from a previous project.

WordPress Disable Self Pings

Depending on your WordPress configuration, plugins, and so forth, your site may be suffering from “self-pings”. Self-pings are pingbacks from your own domain, which are not necessary and look kind of silly displayed alongside other, actual pingbacks. If your site is haunted by self-pings, here is a quick code snippet to stop them.

PHP Error Log Tricks

Super useful trick for customizing error logs when working with PHP.

Free Up Server Disk Space

Recently I spent some time clearing up more free space on my server. Here are some notes on things to check when doing so.

Dealing with translation spam

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

WordPress: Display all comment fields when user is logged in

By default WordPress hides the Author/Name, Email, and URL fields on comment forms when the user is logged in. This is because WordPress automatically gets the related information directly from the user profile. But what if you need to do some testing or troubleshooting and want to display all the fields? Here is a plug-&-play […]

Remove Linked Image Borders in IE

Internet Explorer has a nasty habit of displaying honking blue borders on linked images. This post shows a quick way to disable them using a slice of jQuery.

Protect Against File Injection

Here is a nice copy/paste .htaccess snippet to help block file-injection attacks. It can be added as-is to your .htaccess file to help protect against file injection and other types of malicious activity. This code is a not a replacement for proper data sanitization, but it does help to add another layer of security to […]

Batch Rename Files on Mac

This is especially useful for those bulk photography missions, where you’ve got folders of hundreds of generic useless file names that were created by a camera or mobile device. This quick tutorial explains how to easily batch rename all the files contained in any folder. All that is required is Mac’s built-in Finder app.

WordPress: Customize Read More Links and Text

Here are two code snippets that are useful for customizing the “read more” link. The read more link is displayed on archive views like category archives, author archives, posts archives, search results, and so forth. You also will find the read more link displayed on the site’s homepage and on any page where posts excerpts […]

Free up screen space on EDD settings pages

Easy Digital Downloads recently added a giant logo to all of their settings pages in the WordPress Admin Area. That’s great for them, but users are left with about an inch less of screen space. So now when visiting EDD settings, customers, downloads, etc., you have less vertical space with which to work. This quick […]