If you’re WordPress theme customizer, you should have come to the situation when you need to add advanced meta box to certain post types of your. You can easily create simple post types with input field, textarea, radio buttons, checkboxes, etc. But, what if you need some complex options like file uploader? You’d have to struggle a lot to get things right, isn’t it?
Well, recently while building a WordPress theme for one Podcast website, I came across with similar situation. I had to struggle a lot for right coding for brilliant audio uploader field in the metabox which I had to place for ‘post’ post type. I wrote code myself but couldn’t get satisfied completely with it. On the other hand, I was on the tight deadline as well. As per my motto, I must give brilliant service to my clients. So, how would I do it?
Yes, sometimes plugin is what fits best to your requirements. And you get the right free plugin available in WordPress plugin repository, what would you look for?
I installed Meta box plugin and looked for its menu. I was too much surprised when I didn’t find any menu of this plugin. Now, how would I create meta box? I again googled about it. And, soon I landed to Online generator of page of it’s official website.
I started to fill up the form as per my requirement. I was so much surprised when I saw huge range of fields for meta box. It has all sorts of powerful field ranging from input fields to file advanced, image advanced, taxonomy, user and many more. What I needed was a text input field and a file advanced field. I clicked them, arranged them and finally hit on the ‘Genarate Code’ button. I got pretty clean code. After this all I had to do was paste this code to functions.php file.
Bingo! I got awesome meta-box without any hassle. And, as it’s well tested and well-developed plugin, I need not worry about quality. I found it really awesome!
Sometimes, plugin is what you are exactly looking for. And, Meta Box plugin is so much powerful that you need not worry about anything. Well, there would be problem if your clients don’t install it. So, for this issue, I placed TGM Plugin activation in the theme and configured it to ask theme user to install Meta Box plugin from WordPress repository. Pretty simple right?
We’ve lots more WordPress resources coming up. So, keep following WPCounsel.