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 1 year, 1 month ago.

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

    dhmercer
    Participant
    Post count: 4

    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 http://endtimesresearchgroup.com

    Thanks for your help….

    #21132

    Peter
    Participant
    Post count: 76

    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;
    }

    Website: petercoughlin.com
    Twitter: petercoughlin

    #21169

    dhmercer
    Participant
    Post count: 4

    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.