'New' ribbons for just listed ads (homepage) - code please
I'm wanting to put 'New' ribbons on the 'just listed' ads on the homepage. (see pic)
sample1.jpg
I've been partially successful with my tinkering and got the ribbon showing on the first ad... but only the first. The ribbon is not appearing on any of the other ads.
The code I've used is as highlighted in red (index.php):
<!-- tab 1 -->
<div id="block1">
<span class="new-ribbon"></span>
<div class="clr"></div>
<?php
// show all ads but make sure the sticky featured ads don't show up first
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
query_posts( array('post_type' => APP_POST_TYPE, 'ignore_sticky_posts' => 1, 'paged' => $paged) );
global $wp_query;
$total_pages = max( 2, absint( $wp_query->max_num_pages ) );
?>
<?php get_template_part( 'loop', 'ad_listing' ); ?>
<?php
if( $total_pages > 1 ){ ?>
<div class="paging"><a href="<?php echo $post_type_url; ?>page/2/"> <?php _e( 'View More Ads', 'appthemes' ); ?> </a></div>
<?php } ?>
</div><!-- /block1 -->
Can somebody point in the right direction as to how I get the ribbon showing up on all the new ads, rather than just the first.
Thanks in advance.
Cheers