Pagination only works on Local does not work on Live
-
I am struggling to get pagination working on the live site.
I have tried changing the permalinks.
I have tried remaking the .htaccess file
I have rebuilt the site’s post from scratch manuallyI am at a loss what is wrong because the code works fine locally but not on the live site.
Here is the the index.php code
<?php $queryObject = new WP_Query( array( 'showposts' => 5, 'post_type' => array('post', 'recipe', 'sousviderecipe'), 'paged' => $paged, 'order' => 'DESC', 'orderby' => 'date' )); // The Loop if ( $queryObject->have_posts() ) : $i = 0; while ( $queryObject->have_posts() ) : $queryObject->the_post(); if ( $i == 0 ) : ?> <div class="first-blog-posts"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="blog-link"> <?php if (has_post_thumbnail()) { echo '<div class="first-image">'; echo the_post_thumbnail('feature-image'); echo '</div>'; } ?> <div class="post-box"> <h2 class="blog-title"><?php the_title(); ?></h2> <?php the_excerpt(); ?> </div> </a> </div> <div class="small-blogs"> <?php endif; if ( $i != 0 ) : ?> <div class="blog-posts"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="blog-link"> <?php if (has_post_thumbnail()) { echo '<div class="blog-image">'; echo the_post_thumbnail('blog-thumb'); echo '</div>'; } ?> <div class="blog-title"> <h2><?php the_title(); ?></h2> </div> <div class="blog-text"> <?php the_excerpt(); ?> </div> </a> </div> <?php endif; ?> <?php $i++; endwhile; the_posts_navigation(); endif;?>
- The topic ‘Pagination only works on Local does not work on Live’ is closed to new replies.