- This topic has 1 reply, 2 voices, and was last updated 9 months ago by .
-
Topic
-
Hello,
Could you please help me displaying the uploaded image in a group:
<?php add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); function your_prefix_register_meta_boxes( $meta_boxes ) { $prefix = ''; $meta_boxes[] = array ( 'title' => esc_html__( 'Podcast', 'text-domain' ), 'id' => 'podcast', 'post_types' => array( 0 => 'post', ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array ( 'id' => $prefix . 'podcast_number', 'type' => 'text', 'name' => esc_html__( 'Episode Number', 'text-domain' ), 'required' => 1, 'columns' => 2, ), array ( 'id' => $prefix . 'podcast_author', 'type' => 'text', 'name' => esc_html__( 'Podcast Author/authors', 'text-domain' ), 'required' => 1, 'columns' => 3, ), array ( 'id' => $prefix . 'podcast_title', 'type' => 'textarea', 'name' => esc_html__( 'Podcast Title', 'text-domain' ), 'rows' => 1, 'cols' => 2, 'required' => 1, 'columns' => 7, ), array ( 'id' => $prefix . 'podcast_about', 'name' => esc_html__( 'About podcast', 'text-domain' ), 'type' => 'wysiwyg', ), array ( 'id' => $prefix . 'left_links_2', 'name' => esc_html__( 'Links mentioned (left Column)', 'text-domain' ), 'type' => 'wysiwyg', 'columns' => 6, ), array ( 'id' => $prefix . 'right_links_2', 'name' => esc_html__( 'Links mentioned (right Column)', 'text-domain' ), 'type' => 'wysiwyg', 'columns' => 6, ), array ( 'id' => $prefix . 'author_image', 'type' => 'image_upload', 'name' => esc_html__( 'Author image', 'text-domain' ), 'max_status' => 1, 'max_file_uploads' => 1, 'image_size' => 'medium', ), ), ); return $meta_boxes; }
I need to add a shortcode for it. I’ve tried the code bellow but it won’t work:
$images = rwmb_meta( ‘author_image’, array( ‘limit’ => 1 ) );
$image = reset( $images );
?>
“>
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.