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 is 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
- Using your favorite FTP client, navigate to the wp-includes directory on your server and copy default-widgets.php to your PC
- Using Notepad ++ open default-widgets.php and find the following:
if ( !$number = (int) $instance['number'] )
$number = 10;
else if ( $number < 1 )
$number = 1;
else if ( $number > 15 )
$number = 15;
- Change both occurrences of 15 to 30 to display up to 30 posts
- Next find the first occurance of the following:
at most 15
- Change to at most 30
- Save your default-widgets.php file and upload overwriting the old file on the server
- 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.