Add table to a specific meta box
In order to display a table to a specific meta box, you shoud first choose the right type for this meta box.
If it's true that every type can be used, we recommend you to choose "panel-ho" (Panel Head Only), which displays only panel head.
Here is the base of your script.
<?php
$this->gui->cols_width( 1 , 4 ); // setting cols width
$this->gui->set_meta( 'custom-meta' , __( 'Custom table' ) , 'panel-ho' )->push_to( 1 ); // Push this meta to col 1
The meta box is now ready, you'll create the new item right now. and the data displayed on the table.
<?php
$this->gui->set_item( array(
'type' => 'table-panel', // this type is compatible with "panel-ho" meta box type.
'cols' => array( __( 'ID' ) , __( 'Title' ) , __( 'Content' ) ),
'rows' => array(
array( 1 , __( 'Title 1' ) , __( 'Content 1' ) ),
array( 2 , __( 'Title 2' ) , __( 'Content 2' ) ),
array( 3 , __( 'Title 3' ) , __( 'Content 3' ) )
)
) )->push_to( 'custom-meta' ); // "custom-meta" is the meta box namespace.
That's it !!!
Updated less than a minute ago