Hi!
I've just bought the extension.
Installed through the plug in install.
I'm working on a child theme that inherits twentyfifteens.
In my functions.php I'm adding the following:
add_filter( 'rwmb_meta_boxes', 'hslt_register_meta_boxes' );
function hslt_register_meta_boxes( $meta_boxes )
{
$prefix = 'hslt_';
// 1st meta box
$meta_boxes[] = array(
'id' => 'ImgText',
'title' => 'Testo Immagine',
'pages' => array( 'page' ),
'context' => 'normal',
'priority' => 'high',
'exclude' => array(
'relation' => 'OR',
'ID' => array( 58 )
),
'fields' => array(
array(
'name' => 'Testo Immagine',
'desc' => 'Testo che compare al di sotto delle immagine nei template di primo e secondo livello',
'id' => $prefix . 'testoImg',
'type' => 'wysiwyg',
'std' => 'Anh Tran',
'class' => 'custom-class',
'clone' => true
),
)
);
return $meta_boxes;
}
The problem is that I can see the custom metabox in the page editor and in the client side version.
What I'm missing? Did I jumped some steps?
My final goal is to create metaboxes visible only on specific pages.
This is how I print the metaboxes value in the fornt end:
<?php
$textboxes = rwmb_meta( 'hslt_testoImg' );
if (is_array($textboxes))
{
foreach ($textboxes as $value)
{
echo $value;
}
} else {
echo "Qualcosa è andato storto. Contatta l'amministratore.";
}
?>
Help please!
thank you and have a good day.