Working on my free WordPress plugin, Simple Download Counter, I needed a quick way to check if a remote file exists. As in, requesting the file returns a 200 “OK” response. Here are a couple of ways to do it via PHP.
When working on a PHP project, I usually log any errors to a file (error log), but on some projects it’s necessary to display any errors right there on the page. Here is the code that I use to make it happen.
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 […]
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 […]
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 […]
Ahh yeah, HTML starter templates at your service..
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 […]
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, […]
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.
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 […]
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 […]