URL rewriting on custom post type
-
After reading everything that Google found and not having any success, here is my problem. It “seems” to be related to the “navigation not working” issues but none of the fixes actually fix it.
This is the current code that I have (I’ll outline what is happening below):
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; } $lots_args = array( 'order' => 'ASC', 'orderby' => 'meta_value_num', 'meta_key' => 'lot_number', 'posts_per_page' => 16, 'post_type' => 'auction_lot', 'meta_query' => array( array( 'key' => 'lot_auction_id', 'value' => $auction_id ) ), 'paged' => $paged ); //$args $wp_query = new WP_Query( $lots_args ); if ( $wp_query ) { // are there any lot items while ( $wp_query->have_posts() ) { $wp_query->the_post(); // display the posts } } wp_pagenavi( array( 'query' => $wp_query ) );
When using the “simple” permalink, everything works, but when using the “Post name” permalink, WordPress is redirecting
https://myurl.com/subpage/page/2/
tohttps://myurl.com/subpage/
. Interestingly,https://myurl.com/subpage/2/
works.I found an issue related to WordPress 4.1 (I think) relating to this, but this was fixed in 4.2.
Any ideas where to check what is going on and how to fix it?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘URL rewriting on custom post type’ is closed to new replies.