Pagination – page 2 not showing posts
-
Hi all. I’ve tried searching the google and nothing seems to be resolving my issue. Currently, I’m using pagination on home.php. On localhost, the pagination works as it should, but when I uploaded my site to the domain, pagination stopped working as it should. The code on home.php is:
$currentpage = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array(
'posts_per_page' => 12,
'post_type' => array('arizona_wine', 'arizona_beer'),
'orderby' => 'title',
'order' => 'ASC',
'paged' => $currentpage
);
$all_posts = new WP_Query($args);Then the typical loop with the added variable of $all_posts…
To call the pagination on my theme, I use the ever-so-used:
$big = 999999999;
echo paginate_links(
array(
'base' => str_replace($big, '%#%', get_pagenum_link($big)),
'format' => '?paged=%#%',
'current' => max(1, get_query_var('paged')),
'total' => $all_posts -> max_num_pages,
'prev_text' => ('Previous'), 'next_text' => ('Next'),
)
);The problem I’m running in to is – on localhost, the pagination page numbers work perfectly. I can click page 2, page 3, page 4 etc and content shows up. When I’m on my actual domain name, this is not working. Content that should be on page/2/ isn’t showing up at all (“Page not found”). The URL says page/2/, but it’s referencing index.php.
I should note that the posts are from custom post types “arizona_wine, arizona_beer”. I’m not sure how to pose this question without starting here. If more info is needed, I would be 100% willing to give it. Everything else works as designed. Just this one issue.
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.