Hi Support,
I am using the following code to insert a custom single-image field in WordPress Posts.
<?php
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
function your_prefix_function_name( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = [
'title' => __( 'Post Pin', 'your-text-domain' ),
'id' => 'post-pin',
'context' => 'side',
'closed' => true,
'fields' => [
[
'name' => __( 'Title Pin', 'your-text-domain' ),
'id' => $prefix . 'title_pin',
'type' => 'single_image',
'label_description' => __( 'Post Pin for Pinterest', 'your-text-domain' ),
'force_delete' => true,
],
],
];
return $meta_boxes;
}
After this, I am using WP Stackable's image block to display the image. But it is not working - simply displays a blank image container.
Any solution please?
Kind regards,