Hi
This is my code
<?php
$form = '[mb_frontend_form id="gestione_prodotti_ok" post_fields="title, content, thumbnail" post_id="'.$_GET[pid].'"]';
echo do_shortcode( $form );
?>
...
$meta_boxes[] = array(
'id' => 'gestione_prodotti_ok',
'title' => __( 'Gestione Prodotti', 'textdomain' ),
'post_types' => array( 'prodotti' ),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => __( 'Categorie', 'textdomain' ),
'id' => 'categorie_prodotti2',
'type' => 'select',
'options' => $myarray
),
array(
'id' => $prefix . 'tag_prodotti',
'type' => 'text',
'name' => esc_html__( 'Tag', 'metabox-online-generator' ),
'desc' => esc_html__( 'Separate values by comma', 'metabox-online-generator' ),
'placeholder' => esc_html__( 'Separate values by comma', 'metabox-online-generator' ),
),
),
);
// 2nd meta box
return $meta_boxes;
Where $myarray
is a custom function.
Content field show wysiwyg editor, but if i add a media or put some style (bold, italic etc..) and save, "content" lose everything and save only text.
I want to preserve the html.
Can you help me?