I had so many requests about multiple image uploads in comments in this tutorial, so I decided to create a separate tutorial specifically about that.
Our goal is to create something like this:
Guys, there are actually two ways of creating a meta box like that, the first way is an easy-breezy way, but you have to install my Simple Fields plugin first, the second way – is to do everything manually from scratch. But please do not worry, no matter what method you choose, I am going to cover both of them in this tutorial.
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.
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.
Well, let’s take a look what we are going to create here.
And this is how it looks when you go edit a specific taxonomy term:
Today many of us thinking about WordPress Meta Boxes like about something obsolete. Well, you know, Gutenberg, Full Site Editing and all that stuff. But I can say, that it is not true, yet.
No matter how great Gutenberg becomes, no matter how many cool plugins appear that allow you to manage custom fields, it is always useful to know how to create a metabox from scratch. At least look at WooCommerce, the Products post type works without Gutenberg right now. And probably for your specific project you would need a post type without visual editing. That’s where meta boxes come into play.
We are going to use primary
woocommerce_email_order_meta action hook for that. There is also another hook –
woocommerce_email_order_meta_fields, we will also take a look on it, but I recommend you the first one.