• Merry Christmas to All!

    I want an little guidance in creation of recentposts.php page.

    I have created a new page in wordpress to display all recent posts at one place without widget.
    Below is the code I have in my recentposts.php , I had successfully displayed all posts on that page and now I want previous and next function after every 10 posts.

    Here is the code I have
    //___Code Start____

      <?php

      $args = array( ‘numberposts’ => ’10’ );
      $recent_posts = wp_get_recent_posts( $args );
      foreach( $recent_posts as $recent ){
      echo ‘

    • <img src=”/wp-content/uploads/Arrow1.png”/>‘ . $recent[“post_title”].’
    • ‘;
      }
      ?>

    //__Code End________

    Please let me know what code I should add for previous and next button after every 10 posts. I have more than 50 blog posts.

    Thanks in Advance.
    Nikhil

  • The topic ‘Pagination Recentposts.php’ is closed to new replies.