Hello guys,
Can someone please give me a little help here?
I need to show a custom post type feature image in my single.php.
I am trying this code:
But without success...
It shows the post (single.php) featured image and not the custom post (freeGallery) featured image.
What Im doing wrong? :P
Thanks!!
__________________
Added after 19 Hours 16 minutes:
This is my code, but isn't working... Is only showing the post featured image and not the custom post type featured image.
Can someone tell me what I'm doing wrong?
Thanks
Can someone please give me a little help here?
I need to show a custom post type feature image in my single.php.
I am trying this code:
PHP:
<?php the_post_thumbnail('freeGallery', array('class' => 'imgthumb')); ?>
But without success...
It shows the post (single.php) featured image and not the custom post (freeGallery) featured image.
What Im doing wrong? :P
Thanks!!
__________________
Added after 19 Hours 16 minutes:
This is my code, but isn't working... Is only showing the post featured image and not the custom post type featured image.
Can someone tell me what I'm doing wrong?
PHP:
<?php
$loop = new WP_Query(array('post_type' => 'freeGallery', 'post_status' => 'publish'));
?>
<td><div class="gallerycontainer">
<a class="bestthumbnail" target="_blank" title="<?php echo $post_title; ?>" href="<?php echo get_post_meta($ID,'mr_freeGalleryUrl',true); ?>" rel="nofollow"><?php $title = $post_title; if (strlen($title) > 85){ echo substr($title,0,85).'...';}else { echo $title;}?><span><?php the_post_thumbnail('freeGallery', array('class' => 'imgthumb')); ?></span></a></div></td>
Thanks
Last edited: