echo the "file" meta box problem
-
I read the documentation example on retrieving a medium image for the “file” meta box. But I cannot get it to display an image. I did not rename the “id” it is test_image. I have an image uploaded in my custom options page. This is my code –
$image = wp_get_attachment_image( get_post_meta( get_the_ID(), 'test_image_id', 1 ), 'medium' );
I wrapped that inside php tags, and that is inside img src html tags. What am I missing?
edit- I added
echo $image;
in the line above
- The topic ‘echo the "file" meta box problem’ is closed to new replies.