Limit the number of months displayed by WordPress archives widget

Locate and edit your themes functions.php file. This can either be done in the admin panel by navigating to

Appearance -> Editor -> Click on functions.php file

or by directly editing the file which you can usually find under

wp-content/themes/<theme name>/functions.php

After opening the file simply add the following lines in it.

Replace the number 10 with the number of months that you want to display and you are done!

Leave a Reply