Popular Posts
All posts ordered by popularity
Query String Parameter Redirect
Example snippet showing how to redirect from one URL to another, changing only a single parameter in the query string. It’s a subtle but a commonly used technique, especially in the SEO field, where URLs are changed frequently to optimize for structure, keywords, etc.
WordPress Navigation Links for Monthly Archives
Archives that are easy to navigate make your WordPress-powered site that much more awesome. There are plenty of great strategies for increasing the usefulness of your post archives. For example, this quick tutorial provides some custom functions that display monthly navigation links. So you can display “Previous Month” and “Next Month” links on monthly archive […]
Disable default WordPress widgets
Delivering a clean custom theme involves removing components or features that will not be used. Here’s how to disable WordPress default widgets:
WordPress Random Post Class
Here is a simple plugin that you can use to include a random post class for each post. With a slight modification it can be used to include a random body class. This function can be useful for applying random colors and styles to your blog posts. Or whatever.
Deluxe Copyright Dates in WordPress
There are (at least) three ways to display copyright information (date and name) on your WordPress-powered web pages.
Disable iOS Tap Color
Here is a quick CSS snippet to disable the tap color in iOS.
Why aren’t permalinks working?
Here is a quick guide for troubleshooting why WordPress permalinks might not be working.
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.
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.
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.
WordPress Get Edited Post ID
Working on my plugin Disable Gutenberg, I needed a way to get the ID of an edited post. Not on the front-end, but on the “Edit Post” screen in the WP Admin Area. Unfortunately WordPress does not provide a built-in core function for handling this, so it’s necessary to roll our own solution.
Display the visitor’s Google search terms
A neat trick in your themes is to display the search terms used by the visitor somewhere on the page. Here’s how to do it for visitor’s arriving at your site after searching in Google.