WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 25 of 36

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.

Protect against SQL Injection

Here is a nice copy/paste .htaccess snippet to help block SQL-injection attacks. It can be added as-is to your .htaccess file to help protect against SQL 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 […]

WordPress Prefix Post Titles

A reader recently asked how they can prepend the post date to the post title. Here is a quick and easy way to do it by filtering WordPress’ the_title hook.

Disable Pinterest on Your Pages

Pinterest is a social-media service that people can use to collect your site’s images. The Pinterest browser extension and app add a “Pin it” (or whatever) button to the images that are included on your web pages. That way users can just click a button to add your images to their account on Pinterest. Fortunately, […]

New WordPress plugin: Banhammer!

Quick post to announce my latest WordPress security plugins, Banhammer (free version) and Banhammer Pro. These plugins give you full control over site access, enabling you to warn or ban any user or bot with a click. So you can monitor traffic via slick Ajax UI, and drop the Banhammer on any suspicious or threatening […]

Display user-friendly dates and times

Normally WordPress displays dates using boring old numbers. How much more fun would it be to display dates and times using human-readable language to make them all user-friendly and swell.

Video Tutorials: Securing WordPress Sites

After several months of production, my video course on developing secure WordPress sites is now available at LinkedIn/Lynda.com!

Secure .svn directories

On most servers, the hidden .svn directories that are used for subversion are hidden and protected by default. If you’re paranoid or unsure of whether or not the svn files are protected automatically, you can use a slice of .htaccess to block all public access.

WordPress use post modified time for better SEO

Quick collection of code snippets to help customize post dates to reflect most-recent-update information. I use this technique here at WP-Mix, DigWP, and elsewhere. Using the most recent date as the post date can boost the SEO value of your site.

Minimal, optimal email headers

I recently had a conversation with an email guru concerning the ideal headers to use when sending plain-text email messages. Here is the punchline of that insightful exchange..

Random colors with JavaScript

Here is an old script that’s just too precious to throw away, so here it is for the sake of reference and utter amusement.

Responsive CSS for Simple Ajax Chat

Thank you to Benjamin S. for sharing this CSS snippet for my free WordPress plugin, Simple Ajax Chat. Simple Ajax Chat (SAC) provides a setting that makes it easy to add your own custom CSS/styles. So today we’re going to take advantage of that option to customize the appearance of the SAC chat box so […]