WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 33 of 35

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.

WordPress Change Default Number of Displayed Posts

By default, WordPress displays the same number of posts for the home page (when it is set to display posts) and all types of archive views. To change the default number of posts displayed for any specific view, you can add this simple function to your theme’s functions.php file.

WordPress plugin redirect when settings saved

This technique is a bit esoteric and mostly for my own reference. Feel free to try the code if it makes sense to you; otherwise, maybe just move on to the next code snippet. Just not enough time in the day to explain everything.

Disable WordPress Automatic Updates

In case you haven’t noticed, WordPress auto-updates its core files by default. Neat but not always desired. Here is how to disable auto-updates with a few lines of code.

Filter pre tags in bbPress

A couple of functions used at htaccessbook.com to enable unescaped/unencoded pre and code tags in bbPress forum posts.

WordPress Change Excerpt Length

This code snippet is SO easy.. check it out if you want to change the default number of words included by default in WordPress excerpts.

WordPress Display Plugin “View Details” Screen

Everyone is familiar with the WordPress Plugins screen. Where you can view all installed/active plugins, etc. On that screen, there is a link next to each plugin that says “View Details”. When you click it, a popup dialog overlays the page content. Inside of that dialog is a tabbed interface where you can learn about […]

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.

Truncate Database Table

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

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.

WordPress: Simple Image Upload with jQuery

Some of my free WordPress plugins enable users to select and upload files from their local machine. The uploaded images are handled by WordPress and added to the Media Library. The technique is very basic and easy to implement, requiring only a few snippets added to your WordPress site.

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.