WordPress

Disable REST API in WordPress

Disabling the WordPress JSON REST API can be achieved through a few different methods, depending on your specific needs and…

Converting a Single WordPress Site to Multisite Using WP-CLI

Using the WP CLI command, I wanted to convert a single site to a multisite. I chose the CLI instead…

How to Deregister Gutenberg Block Styles by Finding the Style Handle

The WordPress block editor allows us, the developers, to create new block types. Now with the block.json file configuration is…

Display the most recent articles with WP_Query, but exclude the latest article

To display the latest articles with WP_Query in WordPress but exclude the most recent article, you can use the following…

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…

How to modify the Gutenberg blocks from post content with PHP

Modify the post content generated by Gutenberg by parsing the blocks with PHP and serializing the modified array back to…

register_post_meta is not Saving the Value in WordPress Block Editor (Gutenberg)

What to do when the WordPress block editor meta value, created with register_post_meta, is not saving in DB.

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…

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…

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…