I have a loop on my single.php page like this:-

<?php if (have_posts()) : ?>
    <?php $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; ?>     
    <?php $this_post = $post->ID; query_posts( array('meta_key' => 'epicredrank', 'orderby' => 'meta_value_num', 'order' => 'DESC' , 'paged' => $paged, 'category__in' =>  wp_get_post_categories( $post->ID ), 'post__not_in' => array($this_post),  ) ); ?>
    <?php while ( have_posts() ) : the_post() ?>
    <?php if ( has_post_format( 'video' )) { 
                get_template_part( 'video-post' );
            } elseif ( has_post_format( 'image' )) {
                get_template_part( 'image-post' );
            } else {
               get_template_part( 'standard-post' );
            }
        ?>
    <?php endwhile;?>
    <?php endif; ?>

This works on my local installation to paginate posts on single.php but not on the live server and I can’t work out why.

Have tried saving permalinks etc.

Any ideas?

Read more here: Pagination working locally but not on live site


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: