Thumbnail Image of Post not showing in Sidebar
-
Hey Guys,
Im a little new with wordpress so i need some help. I got a new site up and i added the first post. Now on my sidebar of the homepage it should be adding a thumbnail from the post although I am not sure which or what image it takes from here is the code i think that relates to it.
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
<?php $postaffurl = get_post_meta($post->ID, 'affiliate_url', true); ?> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'small-thumb' ); ?>
Or this one
<div class="topprodleft"> <a>" rel="nofollow"><img src="<?php echo $image[0]; ?>" width="100" height="100" alt="<?php the_title(); ?>"></a> </div>
Any ideas?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Thumbnail Image of Post not showing in Sidebar’ is closed to new replies.