WordPress
WordPress
Check if the current post is using block editor (Gutenberg) or classic editor
WordPress 5+ will use the block editor by default and there is no way to switch to the classic editor…
WordPress
How to register block editor categories
The WordPress block editor allows registering categories for custom blocks. So, if you have many custom blocks you may want…
WordPress
Determine if the site or post editor screen is currently used with PHP
Sometimes we may need to determine if the current block editor is used to edit the full site or a…
WordPress
How to log all SQL queries in WordPress
How do you get a complete log of the SQL queries done when a request is made? You could use…
WordPress
Get the user ID by login in WordPress with a simple function
Recently I needed to get the ID of a user out of a big list. I didn’t want to open…
WordPress
WordPress, Docker, and WP CLI
As someone who has been using Docker for local development over the past five years, I can confidently say that…
WordPress
How to get the parent terms of any taxonomy
A post may have many taxonomies and each taxonomy may have also many terms and then each term may have…
WordPress
Add settings link under plugin name
When creating a custom plugin, you may want to add a custom link to the setting page. That way, the…
WordPress
Modify CPT arguments after it was registered
When registering a new custom post type it’s easy to pass the arguments to the register_post_type function directly. It can’t…
WordPress
wp_parse_args recursive of multidimensional arrays
wp_parse_args is a wonderful function for combining two arrays, objects, or strings in WordPress. But it lacks the possibility to…
Recent comments