Pagination not working properly
-
Hello,
I’ve been trying to setup a wordpress website on my server, but I keep on encountering the same problem.
I uploaded my wordpress website under a /wp folder -> https://dev.example.com/wp
But whenever I try to use the pagination on the home page, the links of the pagination are :
– https://dev.example.com/page/2
instead of
– https://dev.example.com/wp/page/2(plus the pagination is working on category pages such as https://dev.example.com/wp/category/mycat/page/2/
Here is my query :
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } else if ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; } $args = array( 'posts_per_page' => 6, 'orderby' => 'post_date', 'post_type' => 'post', 'order' => 'DESC', 'post_status' => 'publish', 'paged' => $paged, 'post__not_in' => $ids, 'suppress_filters' => true ); $post_query = new WP_Query($args);
I thought it could have come from my .htaccess, so here it is :
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wp/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wp/index.php [L] </IfModule>
I don’t know if I should have a specific .htaccess at my root?
Thank you.
- The topic ‘Pagination not working properly’ is closed to new replies.