WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 24 of 35

Video Tutorials: WordPress Plugin Development

After months of hard work, I am stoked to announce the launch of my new video course on WordPress Plugin Development. It covers the entire process of building, securing, and optimizing your own plugins, including 50+ ready-to-go plugin demos and examples.

PHP output buffering example

PHP’s ob_start() and ob_get_clean() are useful for buffering output of printed content and so forth, but I use them very rarely and tend to forget their order/syntax. So this post provides a quick copy/paste example that I can grab the next time I need to output buffer something.

HTML5 Starter Template

Ahh yeah, HTML starter templates at your service..

Require HTTP 1.1 (and better) for POST

This quick .htaccess snippet requires that the user submit POST requests using only HTTP 1.1 and better.

Display local time with JavaScript

Another oldie but goodie, here is a chunk of JavaScript code that will display local time in a variety of formats.

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Disable PHP version info & error messages

Whenever possible, prevent access to sensitive information about your server. Here is how to prevent PHP from displaying errors and their sensitive infos.

Notes for Plesk Webmail

Recently discovered that emails were not getting thru. Looking into it, turns out that Plesk’s webmail feature was at 100% capacity so it was rejecting all new email. Not good.

Find duplicate email addresses in WordPress

This tutorial explains how to find duplicate email addresses in your WordPress database. That way you can delete or modify as needed.

Escape input with WordPress

WordPress makes it easy to escape untrusted input to prevent SQL-injection, XSS (cross-site scripting), and other nefarious bits of text. Here is a quick rundown of WordPress’ built-in escape functions.

WordPress navigation outside the loop

Normally the template tags used for navigating posts and pages must be included inside of the WordPress loop. This is great but there may be times when you need to display the navigation links outside of the loop.

Protect the WordPress Admin

A secure way to protect your site’s admin area is to lock it down with .htaccess.