Metadata

Image Control Component for Gutenberg Sidebars

I have a super-detailed tutorial about plugin sidebars on my blog. But there were described only some basic field types like TextControl, TextareaControl and ToggleControl.

What about something much more interesting? I mean when there were no Gutenberg years ago, I already created an image uploader field for WordPress meta boxes or options pages. What about creating a custom ImageControl component for Gutenberg sidebars right now?

Image control in Gutenberg plugin sidebars

Add Custom Fields to User Profiles

In this tutorial I am going to show two methods how you can add additional user profile fields in WordPress admin area. In the first one we are not going to use any plugins at all, in the second one – we will do the same, but with the help of my Simple Fields plugin.

Let’s get started, I think. Here is what we are going to create:

additional custom fields in user profiles in WordPress

Add Custom Fields to Comments

I already have plenty of tutorials about working with custom fields – a tutorial about creating custom meta boxes for posts, a tutorial about custom taxonomy term fields, a tutorial about options pages and even my own Simple Fields plugin intended to simplify the work with all that stuff. Now it is time to talk about meta boxes for comments.

The long story short let me show you what we are going to create:

create a custom metabox for WordPress comments

It is not a very difficult meta box, but I am just going to show you the process how it works, everything else is up to you. We are going to do it without any plugins first.

Create Beautiful Datepicker Field in WordPress Admin

In this tutorial I will show you how you can easily create a beautiful datepicker field just like on the screenshot below without any additional JavaScript libraries.

create custom datepicker field in user settings

Meta Boxes Conditional Logic

In this tutorial I will explain you how to show or hide a field depending on a value of another field within a simple WordPress metabox.

Like this:

conditional logic in WordPress meta boxes
Show or hide a custom field depending on a value of another field.

Add Custom Fields to a Taxonomy

In this tutorial I will show you step by step how to add a custom field to a custom taxonomy in WordPress. Of course, this method is going to work great for default taxonomies as well.

First of all I will show you how to do it without any plugins and then we will do the same with the help of my Simple Fields plugin, so you can see the difference.

Well, let’s take a look what we are going to create here.

WordPress custom fields in taxonomy
Here I decided to add multiple fields – a simple text field and an image field.

And this is how it looks when you go edit a specific taxonomy term:

add custom fields on edit term pages

Creating Custom Sidebars with PluginSidebar

Creating Gutenberg sidebars and panels with fields inside of them is a brand new way of working with WordPress metadata. I am sure that the default way of creating meta boxes will stay with us for a long time as a backward compatibility, but believe me that working with the content using blocks and sidebars is a much more pleasant way than trying to configure everything in old-fashioned meta boxes.

So, what we are going to do in this tutorial?

Usually I like to show practical examples in my tutorials. And here is the one – I don’t use any SEO plugins on my projects, because I think they are too heavy and bloated with code. But if you’re familiar with SEO, you know that it is important to add unique titles and meta descriptions for your website pages. And probably you would like to hide some of them from indexing with robots meta tag.

create custom Gutenberg plugin sidebars
Our Gutenberg sidebar has 3 fields here – one text field, one textarea field and one toggle.

Please also stay away from tutorials where it is recommended to work directly with WordPress REST API and use wp.apiRequest etc. That’s not a correct way of creating Gutenberg sidebars.