• 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

Remove Infinite Scroll from Specific Archive Page

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 › Design Tips and Tricks › Remove Infinite Scroll from Specific Archive Page

This topic is: not resolved

Tagged: infinite scroll

  • This topic has 8 replies, 2 voices, and was last updated 12 years ago by daveszt.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • July 2, 2014 at 2:37 pm #112721
    daveszt
    Member

    Today I've turned on Infinte scroll and have it working nicely but i'd like to remove it from one specific archive page but operate on all others.

    The code i currently have is below but i want to remove it working on this page:

    http://www.heyuguys.com/competitions/ which is category ID 226.

    Thanks.

    D

    function ntg_infinite_scroll_init() {
    add_theme_support( 'infinite-scroll', array(
    'container' => 'content',
    'footer' => 'footer',
    'render' => 'genesis_do_loop'
    ) );
    }
    add_action( 'after_setup_theme', 'ntg_infinite_scroll_init' );

    http://www.heyuguys.com/
    July 2, 2014 at 10:20 pm #112772
    Tonya
    Member

    Hi Dave,

    Give this a try:

    function ntg_infinite_scroll_init() 
    {
        //* Bail out if it's 'competitions category
        if (is_category('competitions') return;
    
       // Leave the rest of this function the same as it is
    

    You can place the category slug or it's ID number in the is_category() function.


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    July 3, 2014 at 3:06 am #112805
    daveszt
    Member

    Thanks Tonya. I've added that in but get the error:

    Parse error: syntax error, unexpected end of file in /homepages/23/d310607419/htdocs/HeyUGuys_com/wp-content/themes/lifestyle/functions.php on line 221

    Ive tried putting that in a few different places but it doesnt seem to like it.

    D

    July 3, 2014 at 4:01 am #112819
    Tonya
    Member

    Hi Dave,

    Sorry I missed a the closing ) on the if statement. It should be:

    if (is_category('competitions')) return;


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    July 3, 2014 at 4:13 am #112821
    daveszt
    Member

    Aha, no crashing but it doesnt seem to work. Still loads the first 7 then the rest load when you scroll down.

    Do i need to put this line within the other set of code or at the bottom? I've tried both.

    July 3, 2014 at 12:54 pm #112898
    Tonya
    Member

    Hi Dave,

    I've got family here right now. I'll run some tests tonight and get back with you.


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    July 3, 2014 at 3:15 pm #112901
    daveszt
    Member

    Hugely appreciated. Thx.

    July 4, 2014 at 3:29 am #112940
    Tonya
    Member

    Hey Dave,

    I see that the infinite scroll is now disabled on this category page. Were you able to resolve it?


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    July 8, 2014 at 6:16 am #113364
    daveszt
    Member

    Sorry Tonya, i missed your reply. Not resolved as yet. It's still active.

    D

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2026 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