WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 13 of 35

WordPress Allow HTML in Author Bio

By default, WordPress filters out any markup included in the description (bio) of user profiles. Here is a code snippet to allow HTML in author bios.

Allow access to external IPs during development

When developing sites, an easy way to keep things private is to use .htaccess to restrict access based on IP address.

Secure WordPress Login Page

If you try to log in to some of my WordPress-powered sites via the WP Login Page, you will be met with a 403 “Forbidden” response. For sites where I am the only registered user, I lock things down to prevent endless waves of drip force attacks. It really helps to reduce server load, conserve […]

.htaccess block spammer

Quick tutorial showing how to block a specific spammer via .htaccess. This technique is perfect for forum and site owners who want to block access to pesky visitors based on their reported IP address.

Add Facebook OG Attributes to HTML Tag

When adding Facebook Open Graph (OG) tags to your web pages, it is a good idea to add the required attributes to the <html></html> tag. Here is one way of doing it.

Download large files via SSH

Here is one way to download huge files (or any size file) from your server to your local machine. All you need is an SSH connection and the scp command.

WordPress add titles to post navigation links

In this post, we add title attributes to WordPress post-navigation links, for both previous/next archive navigation and previous/next single-post navigation. These are some simple copy/paste functions that you can add directly to your theme (or via plugin).

Whitelist POST access with .htaccess

Here is how to whitelist POST requests for a specific file. For example, you can protect chat, forum, and other heavily targeted scripts from malicious acitivity.

WordPress wp-config.php tricks

A concise collection of wp-config.php tricks from my WordPress sites to yours.

Canonical URLs for a single page site

In this tutorial, I share a handful of .htaccess techniques for implementing canonical URLs for single-page websites. Also referred to as “brochure” sites (among other things). These are all plug-&-play code snippets, just add to any .htaccess-capable site and enjoy the SEO benefits of having canonical URLs. I use these snippets on my sites, such […]

Limit HTTP Request Size

This .htaccess snippet can be used to restrict the total size of the HTTP request body sent from the client.

CSS text-shadow snippets

Here are some of my favorite/most-used CSS text-shadow snippets.