Results 1 to 3 of 3

Thread: Featured first on index

  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 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?

    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
    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)

  3. #3
    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!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [MOD NEEDED] index.php
    By husslemine in forum ClassiPress General Discussion
    Replies: 1
    Last Post: February 1st, 2012, 09:54 AM
  2. Index.php & Index.html Question
    By goblinnetwork in forum WordPress General Discussion
    Replies: 5
    Last Post: October 16th, 2011, 10:48 AM
  3. Moving to 3.0.5.3 - how do I edit "index-standard" "index-directory"
    By doctorcilantro in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: February 23rd, 2011, 08:50 PM