Posted By : Date : fanuzzi | 04-03-2021
A custom fields are, basically, the properties for a post type. The creation phase of a custom field is divided in two parts: Creation of the structure Define the behavior Creation of the structure Add metabox Metabox is the graphic container of our custom fields. It will appear as a fieldsets in the admin page, containing our custom fields. add_action('add_meta_boxes_{post_type_name}','add_metabox_function');function add_metabox_function($post){  add_meta_box('id','title','metabox_field_function','post_type_name','normal','default');} This function will contain all necessary html, CSS and logical code to manage and show our custom fields. function metabox_field_function(){   //html code to show fields and php…
Read More
0 Comments