You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed as a plugin. but then I get, Fatal error: Uncaught Error: Class 'Cmb2Grid\Grid\Cmb2Grid' not found on my metabox page. I do not have CMB2 as a plugin, but within my own plugin. If that matters.
Is there something I am missing? Not sure what else to say, seems pretty straight forward in usage. Install plugin add code: $cmb2Grid = new \Cmb2Grid\Grid\Cmb2Grid($cmb); ect...
The text was updated successfully, but these errors were encountered:
Hi @neotropic2023@tfont
I had the same problem and I add below code to the function that attached in the hook(cmb2_admin_init) and now it works fine.
add_action('cmb2_admin_init', 'cmb2_register_demo_metabox');
/**
* Hook in and add a demo metabox. Can only happen on the 'cmb2_admin_init' or 'cmb2_init' hook.
*/
function cmb2_register_demo_metabox() {
.
.
.
if(!is_admin()){
return;
}
$cmb2Grid = new \Cmb2Grid\Grid\Cmb2Grid($cmb_tabs_demo);
$row = $cmb2Grid->addRow();
$row->addColumns(array($field1, $field2));
}
I cannot get this to work.
Installed installers with composer. Required autoload.php.
All tests with class_exists() for the namspace class \Cmb2Grid\Grid\Cmb2Grid fail.
I installed as a plugin. but then I get, Fatal error: Uncaught Error: Class 'Cmb2Grid\Grid\Cmb2Grid' not found on my metabox page. I do not have CMB2 as a plugin, but within my own plugin. If that matters.
Is there something I am missing? Not sure what else to say, seems pretty straight forward in usage. Install plugin add code: $cmb2Grid = new \Cmb2Grid\Grid\Cmb2Grid($cmb); ect...
The text was updated successfully, but these errors were encountered: