Category: Development
-
Remove WordPress Actions with Object-Bound Callbacks
Often, it’s very simple to disable a filter or action in WordPress. Core’s adherence, merit notwithstanding, to working in the global namespace meant many plugins and themes followed suit. So unhooking a function was as simple as: But as PHP has matured, plugin and theme authors are more often using modern structures and practices, like…
-
Fix WP Bakery Disabling Gutenberg with Classic Editor Enabled
There’s currently a bug in WP Bakery (version 6.0.5) that enables or disables the block editor, Gutenberg, for an entire post type based on a single post on the various “All [Post Type]” admin screens. You’ve probably noticed this if you’ve installed the Classic Editor plugin and have switching editors enabled. You’d expect to be…
-
Run a WP-CLI Search-Replace for Revolution Slider
If you’re a WordPress developer moving sites between environments, you might find yourself using the WordPress command line tool WP-CLI to run database search-replaces fairly frequently. This lets you quickly swap out one URL for another in the database (so if I want to replace https://sternerstuff.dev with https://sternerstuffdesign.test, for local testing). I inherit a variety…
-
Restore a Fresh Local WordPress Database from Production
Situation: You’ve got your local codebase for a site in place, but the database got wiped, intentionally or otherwise. Maybe you destroyed your Vagrant box. To quickly pull the production database, I’ll often use a tool like WP Migrate DB Pro. Of course, using that tool (or any other plugin-based database migration tool) depends on…
-
Customize Beaver Builder’s Social Media Icons
Here at Sterner Stuff, we find that many of our clients benefit from using a flexible and performant theme that can fit a variety of needs. It helps us deliver projects faster, and for many small businesses, it’s a great fit for their needs. We turn to Beaver Builder to fill this role. While most…
-
Hide WordPress Query Results When FacetWP Facets are Empty
I’ve recently been diving into FacetWP as a tool for getting down and dirty with post filtering in WordPress. I’ve used Toolset Views in the past, and I’m not deep enough to say I have a favorite. But I have enjoyed that FacetWP, by and large, lets me bring my own templates to the party…
-
Convert WordPress Tables to utf8mb4
WordPress version 4.2 changed up the default database table collation. Swapping to utf8mb4 provides support for a wider range of characters, including emojis. If the contents of your content editor are deleted when saving with an emoji in it, this is probably your issue. If you upgraded to WordPress 4.2 while running MySQL version 5.5.2…
-
2019 PHP Benchmarks – Why You Need PHP 7+
2019 is just around the corner, and with it comes Kinsta’s annual PHP benchmarking. You can check out their full post, or keep reading for a quick look at the stuff most important to WordPress or Laravel users. What is PHP and How Does it Affect SEO? PHP is the server language that powers popular…
-
Function to Check if Divi is Active
There are times you may want your WordPress page templates to behave differently depending on whether or not a page builder has been enabled on it. For example, I built out a custom page template for a client that had content that was populated via custom fields, but also space for whatever was in the…
-
-
WordPress Security Basics
This blog post is actually from my wicked-awesome WordPress for Small Business Owners course. If you dig it, you should sign up for the whole thing. It’s totally free! Take the Free Course! If your website is already hacked… You’re welcome to follow this guide and go through the steps to secure your website, but…
-
Better WordPress Transients
WordPress’s built-in transient system gets the job done, but it has a few drawbacks. Depending on how long it takes to refresh your transient and the volume of traffic you get, it may or may not be a problem. Here’s a quick overview of where WordPress falls short, and how you can fix it. How…