Hi there,
I am using Oxygen and am trying to display a single_image that uploaded to a post.
I created a function with the hope that it would output the image's URL, but it doesn't return anything.
function mb_cp_logo_shortcode() {
$image = rwmb_meta( 'info', array( 'size' => 'full' ) );
echo '<a href="', $image['full_url'], '"><img src="', $image['url'], '"></a>';
}
add_shortcode( 'mb-cp-logo', 'mb_cp_logo_shortcode' );
I based the function off of this page, https://docs.metabox.io/fields/single-image/, but I clearly didn't implement it correctly.
I did a search before posting. I found the below topic, but it didn't get me where I needed.
https://support.metabox.io/topic/retrieving-image-in-post-from-new-field/
Thanks!