WP-Mix

A fresh mix of code snippets and tutorials

Category Archive: WordPress

Posts about WordPress

Page 1 of 17

CSS Selectors and Default Styles for the WordPress Admin Area

Here are the CSS selectors used by WordPress in the Admin Area. Note that things are changing relatively quickly in the WP Admin Area, so chances are there are additional selectors and styles that have been added, and likely some changes made to the current list. So this collection of default CSS selectors and styles […]

Quick Apache/.htaccess Snippet to Secure the WordPress Login Page

For WordPress sites where I am the only person logging in, I like to add the following Apache/.htaccess snippet to allow my IP address only, and deny access to all others. So when anyone tries to access the WP Login Page and they are not not coming from my IP address, they are denied with […]

Fix “Function Not Found” Error in WordPress Must-Use Plugins

Posting these notes in case they are useful to anyone looking for related information. This may or may not be related to must-use plugins. I am still testing on vanilla WordPress installation. Update: after some further experimenting, it looks like the issue was resolved by uploading a fresh set of WordPress core files. So try […]

WordPress Remove Query Strings from Scripts and Styles

I’ve had this post sitting here unpublished for a while now. Thought it’s finally time to post and share with anyone who may be looking for it. Basically here are two ways to remove query strings from the URLs of any registered scripts and styles. Let’s take a look..

Customize WordPress Allowed Tags for Comments

By default, the WordPress comment form enables users to include basic HTML tags in their comments. This includes tags like <p></p>, <br />, <strong></strong>, and so forth. These basic tags suffice to add basic formatting in most cases. But for some setups, more tags may be needed.

WordPress: Get Current URL and Slug

Another essential tool for your WordPress development toolbox is getting the URL of the current page. This sounds simple but can be tricky depending on which page or type of page is being displayed. So to help, here is a simple technique to get the current URL for any single post, archive view, custom template, […]

WordPress: Simple Image Upload with jQuery

Some of my free WordPress plugins enable users to select and upload files from their local machine. The uploaded images are handled by WordPress and added to the Media Library. The technique is very basic and easy to implement, requiring only a few snippets added to your WordPress site.

WordPress: Customize Read More Links and Text

Here are two code snippets that are useful for customizing the “read more” link. The read more link is displayed on archive views like category archives, author archives, posts archives, search results, and so forth. You also will find the read more link displayed on the site’s homepage and on any page where posts excerpts […]

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 […]

Over 300 SQL Code Snippets for WordPress

I’m excited to launch my latest book, Wizard’s SQL Recipes for WordPress. Years in the making, Wizard’s SQL Recipes brings together over 300 recipes for managing and optimizing the WordPress database. If you’re a WordPress administrator or developer who wants to level up their database skills, this book’s for you. Check out the PDF Demo […]

Free up screen space on EDD settings pages

Easy Digital Downloads recently added a giant logo to all of their settings pages in the WordPress Admin Area. That’s great for them, but users are left with about an inch less of screen space. So now when visiting EDD settings, customers, downloads, etc., you have less vertical space with which to work. This quick […]

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 […]