Showing certain number of items in archive category in Wordpress

Probably many of you faced a lot of items in archive showing on first page and all other pages in wordpress.

To fix that go to you theme editor in wordpress, find sidebar.php, or left_sidebar.php/right_sidebar.php (depending on the theme you are using). Find something like that:
<?php wp_get_archives('type=monthly'); ?>

Replace with:
<?php wp_get_archives('type=monthly&limit=5'); ?>

Where 5 is the number of items to be displayed.

Leave a Reply

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