I’ve had a lot of trouble with adding this feature to my WordPress theme. First of all I’ve been using WordPress since 2005 and never used the built in uploader, apparently you must use it to use featured images. After getting that working on my web host, I discovered that I can not stop the featured image from appearing on the post itself. I only wanted the thumbnail to appear on the main page, ie index.php.
I never added any thumbnail specific code to single.php, here is how it is:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?><!-- by <?php the_author() ?> --><!-- By Muskie McKay may be necessary for Google Authorship --></small> <div class="entryText"> <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?> <?php wp_link_pages(); ?><!-- This is for paginated posts which I never use. --> <!-- Next Prev stuff should be here, but it isn't working... Do I need it? --> <p class="postMetadata alt"> <small id="postingInformation"> This entry was originaly posted on <time datetime="<?php the_time('Y-m-d'); ?>"><?php the_time('F jS, Y'); ?></time>, it was last edited on <time datetime="<?php the_modified_time('Y-m-d'); ?>"><?php the_modified_time('F jS, Y'); ?></time> and is filed under: <?php the_category(', ') ?><?php the_tags(' and tagged: '); ?>.<!-- No whitespace so period is correct. --> <!-- This should only show if you're logged in. --> <?php edit_post_link('Edit this entry.','',''); ?> </small> </p> <!-- simple line break to help DISQUS work better --> </div> </div> <?php comments_template(); ?><!-- end of The Loop while --> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?>
How can I fix it so the thumbnail doesn’t automatically appear at the top of the post when displayed by single.php. Oh yeah here is a link to my blog. I think I’m done hacking on this for the night.
- The topic ‘Difficulties with featured images (thumbnails)’ is closed to new replies.