WordPress.org

Ready to get started?Download WordPress

Forums

Need to Get an Image from Metabox (1 post)

  1. alemieux
    Member
    Posted 2 months ago #

    I created a metabox so a user can add an image:

    'main-image' => array(
    		'title' => 'Executive Main Image',
    			'fields' => array(
    				'images' => array(
    					'title' => 'Top Image',
    					'type' => 'group',
    					'subfields' => array(
    						'image' => array(
    							'title' => 'Top Header Image',
    							'type' => 'media',
    							'image_size' => 'large',
    							'get' => 'image'
    						),
    					)
    				)
    			)
    		),

    But how do I retrieve that image on the custom page template? I've tried:

    <img src="<?php echo get_metabox_options( $post->ID, "Images", "image" ); ?>" alt="Header Image" />

    But it's not working. Any ideas?

Reply

You must log in to post.

About this Topic