• I’m about to pull my hair out. How do I show an image that I’ve uploaded through a meta box on the “edit page” screen?

    This is my meta box code:

    array(
                'id'        => "{$prefix}floorplan_attachments",
                'name'      => __('Floorplans','framework'),
                'desc'      => __('Provide the images to the floorplans.','framework'),
                'type'      => 'image_advanced',
                'max_file_uploads' => 2
            )

    And this is the code that I’m trying to use to show it on the page:

    $custom_image = get_post_meta( $post->ID, 'REAL_HOMES_floorplan_attachments',true);
    $custom_image=wp_get_attachment_image_src( $custom_image, 'thumbnail' );
    echo $custom_image;

    What am I do wrong? Any help would be greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show Meta Box Image’ is closed to new replies.