Forum Replies Created

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

    (@jennymckenzie)

    Follow up to the above post –

    I figured out that if I add &meta_key=post-icon to the query_posts() so that the code reads like this:

    <?php query_posts('showposts=3&offset=0&meta_key=post-icon'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
    	<img src="<?php echo get_post_meta($post->ID, 'post-icon', true); ?>" alt="Icon for Post #<?php the_ID(); ?>" />
    </a>
    <?php endwhile; endif; ?>

    It does the trick – for the featured section. But it also carries on into the main loop… so that only these three articles show up at all.

    How do I get ALL articles to display in the main loop and only the desiginated (by custom field) ones show up in the sidebar?

Viewing 1 replies (of 1 total)