Meta box not displaying on the plugin page

Question

I am working on a plugin and I am creating a meta box on my page using the below code but it’s not displaying anything.

Any idea where is the issue with my code?

class bt_dashboard
{

    function __construct()
    {

        add_meta_box('metaboxes-sidebox-1', 'Sidebox 1 Title', array($this, 'welcome_bt'), 'welcomebt', 'advanced', 'default');
    }

    function setup()
    {
        // setup class, maybe add hooks
    }


    function welcome_bt()
    { ?>
<h2>Wellcome to metabox</h2>
<?php }
}

0
Naren Verma 2 months 2022-12-05T14:16:32-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse