• EDIT– http://REMINISC3.com . didn’t mean to ask for psychics.

    I’ve looked through lots of forums and while lots of posts talk about thumbnails, they don’t exactly work for me. I am trying to make the top line of images, with the article titles, into a dynamic thing that changes whenever a new article (with a new featured image) is posted. I don’t want to change the bottom one–they’ll show up twice on the page, but that’s okay.

    So basically something that links to the four most recent articles and displays JUST their feature images would be nice. ATM i have it in there as static HTML. I am a complete newb when it comes to php, and attempting to put any in has just messed up the page. If anyone has any advice that would be helpful, please share. My only other solution at this point is to manually update the header’s html > _< .

    PS–i would prefer this to be viewable on all pages. I want to do other things with feature images, but I imagine if you could help me with this, I would figure the rest out > _< . I do NOT want the featured images to appear in the actual articles.

Viewing 1 replies (of 1 total)
  • Thread Starter sarydactl

    (@sarydactl)

    For some reason I can’t edit anymore. I found a temporary solution–

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    <?php static $count = 0;
    if ($count == "4") { break; }
    else { ?>
    <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail('full'); ?></a>
    <?php $count++; } ?>
    <?php endwhile; ?>
    <?php endif; ?>

    However, if you go to the page, you can see that it eats up the fifth post (it skips from post 4 to post 6). Also, it messes up if it has less than five posts. Also, it makes single pages display the thumbnail, which I don’t want it to do. Is there a way to make it a) display four images site-wide that are all the same; and b) keep it from eating up a post? If you can figure out c) display the same post twice on a page, that would also be cool! I would really appreciate help on this v _v ;

Viewing 1 replies (of 1 total)
  • The topic ‘Featured Images as Preview Images?’ is closed to new replies.