Give a 404 page when pagination of custom type post in 3.4.1
-
The index.php is to show custom post type-‘products’, The code is as following.
$wp_query = new WP_Query(); $wp_query->query('post_type=products&paged='.$paged); while ($wp_query->have_posts()) : $wp_query->the_post(); ......
It works well in WordPress 3.3.2.but it goes wrong in 3.4.1.
URL like: https://xxx.com/?paged=1 or https://xxx.com/, it is OK;
URL like: https://xxx.com/?paged=2, it gives a 404 page.
If 404.php file is removed from theme folder,
Enter https://xxx.com/?paged=2, it shows posts, but the page title is ‘Page not found’How to fix it? Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Give a 404 page when pagination of custom type post in 3.4.1’ is closed to new replies.