Results 1 to 3 of 3

Thread: Featured second page?

  1. #1
    Thread Starter
    bfreemanfl's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    28
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Featured second page?

    Featured first on index
    Hey guys I have 4 tabs featured being the first on index.php. I noticed that if you click view more ads at the bottom it brings you to page 2 of latest ads and not page 2 of featured. How can I fix? I'm on version 3.2.1

    Thanks


    <div class="tabcontrol">

    <ul class="tabnavig">
    <li><a href="#block1"><span class="big"><?php _e('Featured Listings','appthemes')?></span></a></li>
    <li><a href="#block2"><span class="big"><?php _e('Just Listed','appthemes')?></span></a></li>
    <li><a href="#block3"><span class="big"><?php _e('Most Popular','appthemes')?></span></a></li>
    <li><a href="#block4"><span class="big"><?php _e('Categories','appthemes')?></span></a></li>
    </ul>

    <?php remove_action( 'appthemes_after_endwhile', 'cp_do_pagination' ); ?>
    <?php $post_type_url = get_bloginfo('url').'/'.get_option('cp_post_type_permalink').'/'; ?>



    <!-- tab 2 -->
    <div id="block2">

    <div class="clr"></div>

    <div class="undertab"><span class="big"><?php _e('Classified Ads','appthemes') ?> / <strong><span class="colour"><?php _e('Just Listed','appthemes') ?></span></strong></span></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( 1, 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><!-- /block2 -->



    <!-- tab 3 -->
    <div id="block3">

    <div class="clr"></div>

    <div class="undertab"><span class="big"><?php _e('Classified Ads','appthemes') ?> / <strong><span class="colour"><?php _e('Most Popular','appthemes') ?></span></strong></span></div>

    <?php get_template_part( 'loop', 'featured' ); ?>

    <?php global $cp_has_next_page; ?>
    <?php if($cp_has_next_page){ ?>
    <div class="paging"><a href="<?php echo $post_type_url; ?>page/2/?sort=popular"> <?php _e( 'View More Ads', 'appthemes' ); ?> </a></div>
    <?php } ?>

    <?php wp_reset_query(); ?>

    </div><!-- /block3 -->



    <!-- tab 1 -->
    <div id="block1">

    <div class="clr"></div>

    <div class="undertab"><span class="big"><?php _e('Classified Ads','appthemes') ?> / <strong><span class="colour"><?php _e('Featured Listings','appthemes') ?></span></strong></span></div>

    <?php
    // show all random 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' => 'ad_listing', 'ad_cat' => $term->slug, 'caller_get_posts' => 1, 'post__in' => get_option('sticky_posts'), 'paged' => $paged,));

    ?>
    <?php get_template_part( 'loop', 'ad_listing' ); ?>

    <?php
    if( $total_pages > 1 ){ ?>
    <div class="paging"><a href="<?php echo $post_type_url; ?>page/2/?sort=Featured Listings"> <?php _e( 'View More Ads', 'appthemes' ); ?> </a></div>
    <?php } ?>

    </div><!-- /block1 -->



    <!-- tab 4 -->
    <div id="block4">
    <div class="clr"></div>

    <div class="undertab"><span class="big"><?php _e('Classified Ads','appthemes') ?> / <strong><span class="colour"><?php _e('Categories','appthemes')?></span></strong></span></div>

    <div class="shadowblock_out">

    <div class="shadowblock">

    <h2 class="dotted"><?php _e('Ad Categories','appthemes')?></h2>

    <div id="directory" class="directory <?php if(get_option('cp_cat_dir_cols') == 2) echo 'two'; ?>Col">

    <?php echo cp_cat_menu_drop_down(get_option('cp_cat_dir_cols' ), get_option('cp_dir_sub_num')); ?>

    <div class="clr"></div>

    </div><!--/directory-->

    </div><!-- /shadowblock -->

    </div><!-- /shadowblock_out -->

    </div><!-- /block4 -->


    </div><!-- /tabcontrol -->

  2. #2
    Thread Starter
    bfreemanfl's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    28
    Thanks
    4
    Thanked 0 Times in 0 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,098
    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)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: March 13th, 2013, 10:28 AM
  2. How To have Listing Page Featured Listings When It Is NOT Your Home Page?
    By radioz in forum Vantage General Discussion (Legacy)
    Replies: 1
    Last Post: September 4th, 2012, 03:39 AM
  3. featured sliderl on each page
    By blabla in forum ClassiPress General Discussion
    Replies: 2
    Last Post: March 29th, 2012, 05:40 AM
  4. Featured slider on every page?
    By Leigh in forum ClassiPress General Discussion
    Replies: 4
    Last Post: March 24th, 2011, 01:02 AM
  5. [MOD NEEDED] Featured Ad Slider on Every Page
    By lewguru in forum ClassiPress General Discussion
    Replies: 0
    Last Post: September 2nd, 2010, 09:02 AM