Results 1 to 6 of 6

Thread: 'New' ribbons for just listed ads (homepage) - code please

  1. #1
    Thread Starter
    Member valance's Avatar
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    97
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Question '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

  2. #2
    Thread Starter
    Member valance's Avatar
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    97
    Thanks
    5
    Thanked 3 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,100
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

  4. #4
    Thread Starter
    Member valance's Avatar
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    97
    Thanks
    5
    Thanked 3 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,100
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

  6. #6
    Thread Starter
    Member valance's Avatar
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    97
    Thanks
    5
    Thanked 3 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Just Listed ads on homepage??
    By fire228 in forum ClassiPress General Discussion
    Replies: 2
    Last Post: March 19th, 2012, 08:17 PM
  2. Replies: 1
    Last Post: March 15th, 2012, 06:22 AM
  3. Remove just listed - most populair - random ads on homepage??
    By bartvriend in forum Report ClassiPress Bugs
    Replies: 12
    Last Post: November 10th, 2011, 07:00 AM
  4. [SOLVED] Homepage Just Listed/ Most Popular/ Random
    By awegner in forum Report ClassiPress Bugs
    Replies: 5
    Last Post: March 13th, 2011, 01:54 PM
  5. Just Listed Homepage Items
    By essej88 in forum Help Using ClassiPress
    Replies: 2
    Last Post: June 7th, 2010, 10:32 PM