Display more than 15 recent posts – WordPress 2.8

Show More than 15 Recent Posts in WordPress 2.8 +. By default the number of recent posts that can be displayed in your WordPress sidebar is (at most 15). Maybe you want to display 30 recent posts or more? It's really a shame that the default limit is 15 posts, so in the following simple solution, I will explain how to modify the WordPress Recent Posts Sidebar Widget entry to Display More Than 15 Recent Posts.

WordPress – How to display or show more than 15 recent posts:

  1. Using your favorite FTP client, navigate to the wp-includes directory on your server and copy default-widgets.php to your PC
  2. Using Notepad ++ open default-widgets.php and find the following:
  3. if ( !$number = (int) $instance['number'] )
    $number = 10;
    else if ( $number < 1 )
    $number = 1;
    else if ( $number > 15 )
    $number = 15;

  4. Change both occurrences of 15 to 30 to display up to 30 posts
  5. Next find the first occurance of the following:
  6. at most 15

  7. Change to at most 30
  8. Save your default-widgets.php file and upload overwriting the old file on the server
  9. Now when you visit your Appearance -> Widgets section, you will have the ability to set your recent posts to the max value you set in step 3.