Avoid showing same text in multiple loops
-
Hi,
I use this multiple loops to show the sold of some wears, so if there are the sold (meta_value=yes) the txt or presentation must be showing one time in top, and others products in bottom, and if the (meta_value=non) the users see a msg like : No sold available.in this loop the only problem is the presentation, it showing many time in the top, so pls how can i let it to be showing one time?
Thanks
<?php query_posts('post_type=wear&meta_key=sold&meta_value=yes'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <p>I'd like this presentation to be showing one time if there is the sold</p> <?php endwhile; ?> <?php rewind_posts(); ?> <?php while (have_posts()) : the_post(); ?> <h1>Yes, there is some sold</h1> <?php endwhile; ?> <?php else : ?> <h1>No sold available</h1> <?php endif; ?>
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Avoid showing same text in multiple loops’ is closed to new replies.