How to Load Production Images in WordPress Dev with .htaccess

The .htaccess file is a configuration file used by the Apache webserver to customize the server’s behavior. WordPress uses this…
Date
April 19, 2023
Posted by

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…
Date
April 18, 2023
Posted by

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…
Date
March 29, 2023
Posted by

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…
Date
September 6, 2022
Posted by

Typescript global window data

I often have to get some data from the global window object. And doing so in typescript will end up…
Date
May 17, 2022
Posted by

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…
Date
May 1, 2022
Posted by

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…
Date
May 1, 2022
Posted by

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…
Date
June 10, 2022
Posted by

Get possible block transforms in Gutenberg block editor

Each Gutenberg block can be transformed into another block type. For example, we can transform a paragraph into a heading…
Date
April 13, 2022
Posted by

Programmatically resize Gutenberg block editor preview

The WordPress block editor allows us, the editors, to resize the view by accessing the “Preview” options from the top-right…
Date
March 13, 2022
Posted by