From the course: Custom WordPress Plugins: Design, Develop, and Distribute

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Creating meta boxes for additional information

Creating meta boxes for additional information - WordPress Tutorial

From the course: Custom WordPress Plugins: Design, Develop, and Distribute

Creating meta boxes for additional information

- Meta Boxes are sections within the WordPress editor that allow you to input extra information or custom fields related to your post type. Think of this as helper information to your title and content area in the WordPress editor. In our project, we will add the fields project start date, project end date, and project status. By creating these meta boxes, we can provide a user-friendly interface for entering and managing this additional data. First, we will use the WordPress function add meta box to create these fields. In your our-project-vault.php file, below the previous code, let's add our code from GitHub file 01_04_a, like apple. Let's go over this code. We start with a function called opv_add_project_meta_boxes. This function adds the meta box to our project custom post type. The parameters of WordPress's add meta box function here are, firstly, the unique id, which here is opv_project_details. Next, we have the title, Project Details. This will appear at the top of our…

Contents