• I am learning plugin development. My code is like below.

    
    <?php
    
    namespace Inc\Admin;
    
    class Admin
    {
        public function __construct()
            add_action( 'admin_menu', [$this,'news_meta_boxes'] );
        }
    
        public function news_meta_boxes()
        {
            add_meta_box('wp_display_settings', __('Display Settings', 'textdomain'), [ $this, 'display_settings_html' ], 'news', 'normal', 'default');
        }
        
    
        public function display_settings_html($post)
        {
            echo 'hello';
        }
    
    }
    
    ?>
    

    But metabox is not showing.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Metabox is not displaying’ is closed to new replies.