• In author.php I’m trying to paginate results limited to three specific custom post types using the wp-pagenavi plugin.

    Hovering over the links in the pagination list shows the correct url structure for the pagination but when clicked redirects to /page/0/ instead of /page/2/ or /page/3/ etc. Have tried changing permalink structure, saving the permalink settings, changing to default, resetting the postdata, merging the queries, on and on, etc… Still getting a /page/0/ redirect with pretty permalinks and a 404 with default structure. Anyway, allons-y:

    <?php $paged = (get_query_var('page')) ? get_query_var('page') : 1;
        query_posts( array(
            'post_type' => array(
                        'sale',
                        'vacation',
                        'lease',
                        ),
            'tax_query' => array(
                array(
            'taxonomy' => 'author',
            'field' => 'slug',
            'terms' => $curauth->user_login
                )
            ),
            'paged' => $paged,
            'tag__not_in'=>array('34'),
            'orderby' => 'meta_value_num',
            'meta_key' => 'price',
            'order' => 'DESC',
            'posts_per_page' => '9' ) // for paging links to work
            );
    ?> 
    
    <?php if (have_posts()) : ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
        //code, hooks, etc…
    
    <?php endwhile; ?>
    
    <?php wp_pagenavi(); ?>
    
    <?php else : ?>
    
        // some other stuff
    
    <?php endif; wp_reset_query(); ?>

    So, when the numbers within the wp_pagenavi() hook are clicked, I get the redirect to /page/0/. No idea what’s happening, but there seems to be issues with CPT pagination. Some of the issues have been resolved but I can’t find a solution that applys to the author pages and this specific redirect issue.

    Other notes: I am using w3 total cache, so my .htaccess has all of those rules along with the basic wordpress stuff.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Stebok

    (@stebok)

    I have the same problem as you do. I don’t think W3 Total Cache is the culprit though because my .htacess is the default WP

    rbaccaro

    (@rbaccaro)

    I am joining the club. Permalink /author/author-name/ and pagination broken on authors page.

    Any idea anyone?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pagination Redirect Issue in author.php Using Custom Post Types’ is closed to new replies.