How to limit archive

Community Forums Forums General Discussion How to limit archive

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  dhmercer 2 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #18994


    I have the news theme installed and I am trying to learn how to limit the number of archive months.  I have the archive in the footer two widget area and it has grown too long.  It makes the bottom of the page look uneven. Does anyone know how to limit this.  I have looked at the wordpress codex and the instructions there do not work for me.  My website is at

    Thanks for your help….



    You can use the following code to limit the number of items returned by the archives widget;

    add_filter( ‘widget_archives_args’, ‘custom_widget_archives_args’ );
    function custom_widget_archives_args( $args ) {
        $args[‘limit’] = 6;
        return $args;


    Thank you very much!!!! It worked like a charm!!!!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.