• 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

HTML5 Themes and Jetpack Infinite Scroll

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 › HTML5 Themes and Jetpack Infinite Scroll

This topic is: resolved

Tagged: html5, infinite scroll

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 7 months ago by Susan.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • September 15, 2013 at 4:14 am #62612
    Ahjira
    Participant

    Have any of you solved the issue of Jetpack's Infinite Scroll needing an ID on the content div for it to work? Genesis HTML5 does not output an ID on the content div anymore and that's why Infinite Scroll does not work.

    I'm curious if a "best solution" to work around this has been noted yet.

    EDIT: I threw some jQuery in the Genesis Header Scripts field ( which does add the ID's ) but Infinite Scroll still doesn't work for me with HTML5 enabled.

    <script type="text/javascript">
    jQuery(document).ready(function($) {
      $('.content').attr('id', 'content');
      $('.site-inner').attr('id', 'inner');
    });
    </script>
    November 20, 2013 at 11:01 am #74408
    Susan
    Moderator

    As you posted this a while back, I hope you were able to get your issue resolved. If not, can you please check back in here, and I will escalate for you. Thanks!

    November 20, 2013 at 4:03 pm #74579
    Ahjira
    Participant

    Hey Susan, yes I found Gary Jones's solution on GitHub for this and this should do it if anyone else is looking for the answer. This is for HTML5 themes only.

    First add a new ID to the content section...

    add_filter( 'genesis_attr_content', 'jpis_add_id_to_content' );
    function jpis_add_id_to_content( $attributes ) {
      $attributes['id'] = 'main-content';
      return $attributes;
    }

    Then add Jetpack support like this...

    add_action( 'init', 'add_jpis_support' );
    function flint_add_jpis_support() {
      add_theme_support( 'infinite-scroll', array(
        'type' => 'scroll',
        'container' => 'main-content',
        'footer'	 => false,
        'render' => 'genesis_do_loop'
      )
      );
    
    }

    My original solution was firing too late but this solution did the trick. Thank you for checking up. Much appreciated 🙂

    November 20, 2013 at 4:28 pm #74585
    Susan
    Moderator

    Thanks for coming back with the solution! I will close this thread now. If you have any more questions, go ahead and start another thread. Thanks!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘HTML5 Themes and Jetpack Infinite Scroll’ is closed to new 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