I've setup a custom query for my posts (single.php) with pagination, which by the way is working great with the default permalink structure.
if I switch the permalinks to /%postname%/ the page/2/ redirects to the first page.
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array( 'connected_type'=> 'posts_to_posts', 'posts_per_page' => 3, 'paged' => $paged, 'order' => 'ASC', 'connected_items' => get_queried_object() ); $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query( $args ); if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?> <a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a> <?php endwhile; endif; $wp_query = null; $wp_query = $temp; wp_reset_query(); ?>
What's confusing me is the fact that ir's working with the default permalinks, why isn't in working with the "pretty" links?
Homepage pagination is working fine, just the post page that's messed up somehow. Can anyone point me to the right direction? where should I be looking for errors?
I've deactivated all plugins, deleted htaccess and created a new one, still nothing.