0

I am using WordPress 'wp_page_numbers' plugin and the next pages are empty. I'm not sure what's going on with my code but it's suppose to start over again on the next page. Here is what I have............................

<div class="container post_container" id="blog_post_container">

 <div class="row">
    <div class="col-xs-12">
    <div class="running_head_pink" id="recent_posts">
    <h1>Recent Posts</h1>
    </div>

    <?php 

      $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
      $recentPost = new WP_Query(

            array(
                'type' => 'post',
                'posts_per_page' => 6,
                'order' => 'ASC',
                'orderby' => 'date',
                'cat' => '39',
                'paged' => $paged

            )

            );

        if(have_posts()) { ?>
    <br>
    <br>

    <div class=" row posts_table">

        <?php 

        $counter = 0;

        while($recentPost->have_posts()) {

        $recentPost->the_post();


                ?>

        <div class="col-xs-4 recent-blog-posts" id='border-right'>



            <div class="recent-thumbnail"><?php echo the_post_thumbnail('medium') ?><h3 style="color:pink; font-family:Anton, sans-serif;"><?php echo get_the_date('n.d.y'); ?></h3></div>
            <h2 class="blog-title" id="container_titles"><?php the_title(); ?></h2>
            <br>
            <p>
            <!-- <?php echo get_the_excerpt() ?> -->
            <a class="ghost-button" href="<?php the_permalink(); ?>">Read</a>


        </p>

        <hr style='border-color:pink'>




        </div>



        <?php 

        $counter++;

        if($counter %3 == 0) {
            ?>

                    </div>
        <div class="row posts_table">


        <?php

        }   

                }

                  wp_reset_postdata();

             ?>

             </div>

             <?php

              if(function_exists('wp_page_numbers')) { wp_page_numbers();  


            }


            }

            ?>

        </div>
    </div>
    </div>


<?php get_footer(); ?>
0

For one thing, that plugin hasn't been updated in 8 years (https://wordpress.org/plugins-wp/wp-page-numbers/). George W. Bush was still president when that code was written. You should never use plugins that are not actively maintained because they most likely won't work. Try wp_page-navi (https://wordpress.org/plugins/wp-pagenavi/). It's actively developed/maintained.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.