Fixed. For those interested in the solution and the cause of the problem:

the call to wp_get_archives() was being done inside an if block in this case which was not being executed (the condition being the absence of dynamic_sidebar() )

Hence to overcome this problem, we can use the `widget_archives_args` hook and add a filter accordingly. Therefore in functions.php

PHP Code: 
/* Limit the archive to 8 months
--------------------------------- */
function limit_archive($args) {
    
$args['limit'] = 8;
    return 
$args;
}
add_filter('widget_archives_args''limit_archive'); 
Gaurav Reviewed by Gaurav on . Help with Listing Archives in Sidebar I am trying to reduce the number of archives listed in sidebar from all to 8 months. I looked up wordpress.org function reference for help and replaced: <?php wp_get_archives ?> with <?php wp_get_archives('type=monthly&limit=8'); ?> Rating: 5