• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to limit archive

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › How to limit archive

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 12 years, 5 months ago by dhmercer.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 8, 2013 at 1:03 pm #18994
    dhmercer
    Member

    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....

    February 18, 2013 at 5:33 pm #21132
    Peter
    Member

    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;
    }
    February 18, 2013 at 7:35 pm #21169
    dhmercer
    Member

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

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble