Category: Code
-
What is WP_DEBUG for and how do I use it?
Turning on WP_DEBUG will allow you to see PHP warnings, notices, and errors so that you can fix them in your code.
-
PHP v7.1 and v7.2 Illegal Strings
An update to Yoast SEO v11.1 came out yesterday, causing a few site errors relating to illegal strings in PHP. It made me dust off this post to provide some detail on what that PHP warning is, why it is happening, and how it can be fixed. Last year I updated all existing client sites…
-
How to Remove the Genesis SEO Settings
Maybe you don’t use the Genesis SEO settings on your site because you’re using Yoast SEO or All in One SEO, or some other plugin. Here’s how to remove it!
-
When to use isset(), empty(), and is_null() in PHP
Since PHP is a dynamic language, you should check that a variable exists before attempting to use it in your code. Let’s look at the difference between isset(), empty(), and is_null() to do just that.
-
Fix Missing Leading Zeroes in WordPress Zip Codes
Recently, I helped a client import a large set of addresses into a location plugin for WordPress. The import mainly went smoothly, but we noticed some issues when searching in areas with zip codes leading with one or two zeroes. The addresses weren’t coming up as they should. After examining some of the imported addresses,…
-
Setting up a Custom Palette in Gutenberg
When using the new Gutenberg editor in WordPress, you can set a custom palette, or allow users to customize it to fit their needs.
-
Fixing Style Issues While Editing Beaver Builder
If you write CSS that affects Beaver Builder modules, you may accidentally make changes to the page editor as well. Here’s a way to fix that.
-
Display a Notice for New WordPress Posts
If you want to signal when an article or custom post type is less than two weeks old, this PHP function can help.
-
How to Keep Gravity Forms Displayed After Submission
Keep your Gravity Form displayed after a user submits it, while showing the confirmation that the form successfully submit.
-
How to Display Links in Print Mode on Your Website
How to make print styles with CSS media queries to include a URL to a link in your site content when printed.
-
Breaking Servers and Learning By Trial
I mentioned in the past that I run my own mastodon instance. You can find it at tech.lgbt, where I’m ostensibly creating a community for LGBTQIA+ folks who are interested in technology. I chose to wait until this morning to update Mastodon to v2.4.0 on the server that I host this instance at, thinking that…
-
Homebrew Saves Me Time Every Day
I don’t remember exactly when I started using Homebrew, but I know that I had been using a Mac as my regular computer for a while and wanted an alternative to manage dev tools. Homebrew would turn out to be my first foray into the concept and practice of package management, and it’s been tremendously…