WordPress.org

Support

Support » Plugins and Hacks » Hacks » help with get_post_thumbnail_id instead of get_post_meta? IE incompatible!?

help with get_post_thumbnail_id instead of get_post_meta? IE incompatible!?

Viewing 1 replies (of 1 total)
  • You can display the thumbnail by placing <?php echo get_the_post_thumbnail($post_id); ?> where you want the image to appear on your template. Similarly, <?php echo wp_get_attachment_image($attachment_id); ?> will do the same for an attached image.

    As you say, getting the attachment ID is a bit complicated. See Function Reference/get children for some examples on how to do that.

Viewing 1 replies (of 1 total)
  • The topic ‘help with get_post_thumbnail_id instead of get_post_meta? IE incompatible!?’ is closed to new replies.