• I am using the following code in a custom plugin to add the add new command in a plugin using a meta box but im using xampp and it says that do meta boxes is undefined for some reason.

    add_meta_box(‘persons_form_meta_box’, ‘Person data’, ‘custom_table_example_persons_form_meta_box_handler’, ‘person’, ‘normal’, ‘default’);

    <div class=”wrap”>
    <div class=”icon32 icon32-posts-post” id=”icon-edit”>
    </div>

    <form id=”form” method=”POST”>
    <?php /* NOTICE: here we storing id to determine will be item added or updated */ ?>
    <input type=”hidden” name=”id” value=”<?php echo $item[‘id’] ?>”/>

    <div class=”metabox-holder” id=”poststuff”>
    <div id=”post-body”>
    <div id=”post-body-content”>
    <?php /* And here we call our custom meta box */ ?>
    <?php do_meta_boxes(‘person’, ‘normal’, $item); ?>
    <input type=”submit” value=”<?php _e(‘Save’, ‘custom_table_example’)?>” id=”submit” class=”button-primary” name=”submit”>
    </div>
    </div>
    </div>
    </form>
    </div>

    This is the full paste bin of the plugin in and bare with me im learning development

    https://pastebin.com/R2QGHuBv

  • The topic ‘Do meta boxes not working’ is closed to new replies.