Home>Support>Problem with using metabox

Problem with using metabox

Adding https://github.com/siteorigin/docs/blob/develop/widgets-bundle/advanced-concepts/post-meta-box-forms.md#example—adding-fields-for-a-specific-post-type to hello-world widget results nothing !!!!

function initialize() {
	    global $sow_meta_box_manager;
	   
	    $sow_meta_box_manager->append_to_form(
	        $this->id_base,
	        array(
	            'my_widget_fields_section' => array(
	                'type' => 'section',
	                'label' => __( 'My Widget Meta Fields', 'siteorigin-widgets' ),
	                'fields' => array(
	                    'some_post_meta_text' => array(
	                        'type' => 'text',
	                        'label' => __( 'Meta Text', 'siteorigin-widgets' )
	                    ),
	                )
	            )
	        ),
	        array( 'post' )
	    );

	    $this->register_frontend_scripts(
	        array(
	            array( 'hello-world-script', plugin_dir_url(__FILE__) . 'js/script.js', array( 'jquery' ), '1.0' )
	        )
	    );
	    
	    $this->register_frontend_styles(
	        array(
	            array( 'hello-world-style', plugin_dir_url(__FILE__) . 'css/style.css', array(), '1.0' )
	        )
	    );
	}

the scripts are rendered as expected . but the metabox is not displaying .

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More