Tuesday, November 29, 2022
HomeWordPress Developmentplugins - add_meta_box exhibiting clean display screen in my web page

plugins – add_meta_box exhibiting clean display screen in my web page


I’m engaged on the plugin and getting points in add_meta_box.

// Web page URL- 

http://localhost:8080/wordpress/wp-admin/admin.php?web page=testingpages&motion=edit

//Plugin web page code

if ($_GET['action'] == 'edit') {
        embody('admin/views/view-edit.php');
}

The beneath is code, I’m utilizing on the view-edit.php web page

operate adding_custom_meta_boxes($put up)
{
    add_meta_box(
        'testingpages',
        __('My Meta Field'),
        'render_my_meta_box',
        'web page',
        'regular',
        'default'
    );
}
add_action('add_meta_boxes', 'adding_custom_meta_boxes');

operate render_my_meta_box()
{
    // code right here
}

I get a clean display screen. Any concept the place is the difficulty with my code?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments