How to Create Post Meta Box?

You can create a custom meta box under any post types by class   AddMetaBox()

 

Files need to add:

classes/class-meta-box.php
classes/class-form-fields-generator.php

Use on the theme:

Copy these file under “includes” directory and you can add in your theme directory as follows under “functions.php” file

require get_template_directory() . '/includes/class-form-fields-generator.php';
require get_template_directory() . '/includes/class-meta-box.php';

Main CSS & Js file need to add

css/pickplugins-options-framework.css
js/pickplugins-options-framework.js

3rd Party CSS and JS file as need

css/codemirror.css
css/fontawesome.min.css
css/jquery-ui.css
css/select2.min.css

js/select2.min.js
js/codemirror.min.js
js/form-field-dependency.js

 

Example:

Please see the following file is providing a demo input field under the category

example/functions-meta-box.php