I am trying to add default pagination to my WordPress loop but it,s show nothing..plz help thanks

I am trying to add default pagination to my WordPress loop but it,s show nothing. I simply need the default wp pagination. .Could anybody point me in the right direction? thanks

 <?php

                        $paged = (get_query_var('paged')) ? get_query_var('paged') : 0;

                        $postsPerPage = 5;
                        $postOffset = $paged * $postsPerPage;

                        $args = array(
                        'posts_per_page'  => $postsPerPage,
                        'category_name'   => 'Blog',

                        'offset'          => $postOffset,
                        'post_type'       => 'post'
                        );
                        $myposts = get_posts($args);
                     foreach ($myposts as $postt) { 
                     //print_r($postt);die;?>
                    <div class="panel panel-default">
                      <div class="panel-heading">
                        <h4 class="panel-title">
                          <a data-toggle="collapse" data-parent="#accordion" href="">
                          <?php $postt->post_title;?>
                            <?php echo $postt->post_title ?>  <span class=""></span>
                          </a>
                        </h4>
                      </div>
                      <div  class="panel-collapse collapse in">
                        <div class="panel-body">
                        <?php $postt->ID;?>
                        <?php $url = wp_get_attachment_url( get_post_thumbnail_id($postt->ID), 'thumbnail' );?>
                        <img class="why-choose-img" src="<?php echo $url ?>" />
                        <?php $postt->post_content; ?>
                        <p> <?php echo $postt->post_content; ?></p>
                        </div>
                        <?php next_posts_link( 'Older Entries ', $postt->max_page);
                        previous_posts_link( '" Newer Entries' ); ?>
                      </div>
                    </div>
                     <?php } ?>

Read more here: I am trying to add default pagination to my WordPress loop but it,s show nothing..plz help thanks

Leave a Reply

Your email address will not be published. Required fields are marked *