WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 33 of 35

Auto-Height for Ajax-Loaded Content

Here is a jQuery function for automatically setting the height of Ajax-loaded content.

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

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.

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 […]

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.

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.

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.

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.