In this tutorial I would like to guide you how you can create WordPress REST API requests in order to manage custom taxonomy terms. And also I’d like to show you some interesting examples along the way.
The idea of this article actually came to my mind when I was developing an add-on for my Simple WordPress Crossposting plugin.
In my another tutorial about syncing users using WordPress REST API I received a question in comments, where I was asked about metadata. After googling for quite a bit I found out that there is no clear explanation out there about using user’s meta in REST API requests.
I’ve been working with WooCommerce REST API for quite a while now, well, I developed a couple of plugins – Simple WordPress Crossposting and Simple Inventory Sync and both of them are relying on WooCommerce REST API.
And when you develop something that is intended to be used not only on your test website with 5 products total but also on high load websites, when orders can contain more than 100 products and variations, of course you should always keep performance in mind.
In this tutorial I will share with you some simple simple yet effective tips and tricks.
When you create a block.json file for your custom Gutenberg block, you will need to provide a
category parameter into it.
By default we can use one of the default ones:
But with the help of
block_categories_all filter (
block_categories in case you’re still using WordPress 5.8.0 version or below) you can create a new block category easily.
For example let’s take a look at this custom category created by Jetpack plugin:
And this is our custom category:
In this tutorial we are about to learn how to work with WordPress block filters,
blocks.registerBlockType in particular. This filter allows not only to change block attributes and their default values but also other block data like title, description etc.
If you have ever used WordPress starter themes, then you will absolutely love
@wordpress/create-block command line tool.
I personally rarely used starter themes for my WordPress projects and usually I don’t rely on
@wordpress/create-block tool when creating blocks. But anyway I think it is a great tool and you should know how to use it.
As a result of this lesson, we will have a really simple block inside the Block Editor.
But recently I faced with another challenge – I needed a repeater field as a block setting inside Inspector Controls (in my Simple Carousel Block it was intended to configure multiple responsive breakpoints). Like this:
And that is when the things didn’t go as expected at all. So let me just break it down for you if you’d ever face with something like this.