WP-Mix

A fresh mix of code snippets and tutorials

HTML5 Starter Template

Ahh yeah, HTML starter templates at your service..

WordPress: Display all comment fields when user is logged in

By default WordPress hides the Author/Name, Email, and URL fields on comment forms when the user is logged in. This is because WordPress automatically gets the related information directly from the user profile. But what if you need to do some testing or troubleshooting and want to display all the fields? Here is a plug-&-play […]

WordPress: Display All Registered Image Sizes

By default, WordPress generates extra images for each image that is uploaded via the Media Library. These extra images are created in different sizes and are used for different things, like featured images and so forth. In addition to the default generated images, other image sizes may be added via themes and plugins. For example, […]

WordPress: Get category slug on archive views

When working with WordPress, you can get the current post category using the function get_the_category(). That’s great but it works only on single posts and pages. This post explains how to get the category for archive views like date archives, category archives, search results, and so forth.

WordPress Display Plugin “View Details” Screen

Everyone is familiar with the WordPress Plugins screen. Where you can view all installed/active plugins, etc. On that screen, there is a link next to each plugin that says “View Details”. When you click it, a popup dialog overlays the page content. Inside of that dialog is a tabbed interface where you can learn about […]

WordPress Sidebar Template Code

When developing my free WordPress starter theme, I end up with lots of sweet code snippets that for whatever reason didn’t make the final cut. For example, the sidebar template was recently refactored with shiny new code. So what to do with the previous sidebar code? Delete it? Nah, instead I would rather share it […]

Disable Combined Scripts in the WordPress Admin Area

If you’ve ever tried to debug JavaScript or CSS for pages in the WordPress Admin Area, you know that it’s next to impossible to sort out which files contain which scripts. Why? Because WordPress combines them all at runtime into a single, concatenated script. It’s referred to as concatenation, and it helps to reduce the […]

WordPress Post Navigation Enlightenment

For some reason, I am fascinated by how post navigation is handled by WordPress and others CMSs. For example, what is the correct order of the “previous” and “next” post-navigation links? Is it different for single posts versus archive views? Should the arrow point right or left? And so forth. After pondering these questions periodically […]

WordPress Trigger and Target Interim Login Screen

Our previous post on WordPress login parameters is very complete. Or so I thought. But I had forgotten about the “Interim Login Screen”. The interim login screen is displayed when you are working in the WP Admin Area and for some reason the session expires and you are logged out.

WordPress Disable jQuery Migrate

The jQuery Migrate plugin is used to help sites upgrade to the latest version of jQuery. The script restores APIs that have been removed, and the development version shows warnings in the browser console for any deprecated or missing APIs. This enables developers and admins to more easily upgrade from older to newer versions of […]

WordPress Remove Menu Item

Quick WordPress tutorial for you today. How to remove an unwanted item from the WordPress menu. You know, the main menu that you find on the left-hand side of the screen when logged into the WordPress Admin Area. If you have a menu item that you want to remove, this post shows an easy way […]

Set Timeout and Redirect with JavaScript

Hello again! This WP-Mix tutorial shows how to set a timeout and redirect to any URL using vanilla JavaScript. It’s one line of code easy peasy.