WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 30 of 36

Why aren’t permalinks working?

Here is a quick guide for troubleshooting why WordPress permalinks might not be working.

CSS Style Placeholders

When displaying with HTML forms, most modern browsers display placeholder values for textarea and input fields. Once you’ve added placeholder attributes to your form fields, you can style their appearance via CSS.

CSS Viewport Tricks

Note to self: you can specify various viewport properties such as initial-scale and user-zoom via <meta /> tags or directly via CSS.

Apache Require HTTP 1.1 for POST Requests

A reader recently asked how to limit POST requests to only HTTP 1.1. Well here is an .htaccess snippet that will do it.

Deluxe Copyright Dates in WordPress

There are (at least) three ways to display copyright information (date and name) on your WordPress-powered web pages.

Display a number for each post

To display an auto-incrementing number for each post, add the following snippet to your theme’s functions.php file:

772×250 vs 772×250

Just a heads up for Photoshop users exporting graphics for their WordPress plugin in the WP Plugin Directory.

Superbox replace rel with data-rel

At WP-Tao.com, I use jQuery Superbox to display lightbox-style popup images and screenshots. Here is a quick mod used to replace rel attributes with data-rel.

Content negotiation for WordPress

Quick PHP script for automatically selecting the best content type based on what the browser accepts. Works as-is for WordPress, or is easily modified to work with any PHP page.

jQuery Toggle Password Field

Just a quick jQuery code snippet to toggle a password field. I used this technique for the license field of my premium WordPress firewall plugin, BBQ Pro. Sharing it here for reference and just in case I need to use it again.

Site online but can’t access

Here are a few steps to take if a website is online but you are not able to access it.

Obscure template tags that rock

Here are my favorite “lesser-known” and perhaps even obscure template tags for WordPress: