the_post_image not working
-
I have added this exact line to my empty functions.php:
<?php add_theme_support('post-thumbnails'); ?>
I have created a post and used the “add an image” feature. Media Library says the image is attached to the post.
I have tried adding this for the posts to show the image:
<?php the_post_image(); ?>
Nothing is being output.
Doing:
<?php if ( has_post_image() ) the_post_image( 'medium' ); else echo '<p>Darn, there is no image.</p>'; ?>
outputs the darn message.
What am I doing wrong?
Viewing 15 replies - 1 through 15 (of 15 total)
Viewing 15 replies - 1 through 15 (of 15 total)
- The topic ‘the_post_image not working’ is closed to new replies.