Pagination /Permalink Error
I have already tried the fixes I have found on the forum and have not been able to correct this issue.
I have deactivated my plugins and changed my permalinks and it still does not work.
I am running classipress 3.2 and wordpress 3.4.2
I have 3 blocks/tabs on my homepage 1. Feature Ads 2. Just Listed 3. Categories and have made all of my customizations in a child theme...
The View more ads link brings up a page not found error for Just Listed ads.
I have tried changing my permalink from default to custom and then neither my links from my ads to their single-ad page works and the view more ads link still does not work.
Currently all my correct links come up as
www.mysite.com/trc/?ad listing="ad title" and all other links are working
My view more ads link is coming up as
www.mysite.com/trc/ads/page/2/
Does anyone have any suggestions? I have tried the tutorials listed for this issue.......
My code is as follows
<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('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 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/?featured=1"> <?php _e( 'View More Ads', 'appthemes' ); ?> </a></div>
<?php } ?>
</div><!-- /block1 -->
<!-- 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 ) );
$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 -->