Title: Jetpack Infinite Scroll problem
Last modified: December 7, 2020

---

# Jetpack Infinite Scroll problem

 *  Resolved [webtomeasure](https://wordpress.org/support/users/webtomeasure/)
 * (@webtomeasure)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/jetpack-infinite-scroll-problem/)
 * I can’t seem to get Infinite scrolling working on a custom archive page. It seems
   to me it’s not picking up the arguments from the add_theme_support call. Here’s
   the code:
 *     ```
       /**
           * Add theme support for infinite scroll.
           *
           * @uses add_theme_support
           * @return void
           */
           function twenty_twelve_infinite_scroll_init() {
           add_theme_support( 'infinite-scroll', array(
               'container'      => 'catalogue-section',
               'render'         => 'my_child_infinite_scroll_render',
               'posts_per_page' => get_option( 'posts_per_page' ),
               'wrapper' => false,
               'type' => 'scroll',
           ) );
   
           }
   
           add_action( 'after_setup_theme', 'twenty_twelve_infinite_scroll_init' );
   
           function my_child_infinite_scroll_render() {
   
           while ( have_posts() ) : the_post(); 
               // Format of a catalogue entry is defined in catalogue-entry.php
               get_template_part( 'catalogue-entry', get_post_type() ); 
           endwhile;
       }
       ```
   
 * The layout of the page shows entries from the initial custom posts correctly.
   However, when the second set of posts is called, it is not formatted correctly,
   as it’s no longer sitting inside the section that is targetted in my CSS to have
   multiple columns.
 * See the result here: [https://www.staging5.shortkidstories.com/story/](https://www.staging5.shortkidstories.com/story/)
 * I can see that Infinite Scroll is adding a div around the rendered posts even
   though in the add theme support call I set wrapper to false:
 * `<div class="infinite-wrap infinite-view-2" id="infinite-view-2" data-page-num
   ="2" role="region" aria-label="Page: 2.">`
    Also it wasn’t picking up my rendering
   call, so I had to update the default content.php to get the correct format of
   the entries. I wonder can anyone see why the add_theme_support parameters for
   infinite scrolling are not being picked up?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjetpack-infinite-scroll-problem%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [MadHatter (a11n)](https://wordpress.org/support/users/madhattersez/)
 * (@madhattersez)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/jetpack-infinite-scroll-problem/#post-13760928)
 * Hello, there.
 * Layout, design, and custom code are definitely outside the scope of our support
   since we only develop the Jetpack plugin itself, not WordPress at large – of 
   course, plugins and themes can alter the way infinite scroll and your custom 
   CSS loads. The best options for further help on that would be your webhost, to
   consult with another developer / designer, or to (hopefully) see if someone else
   in the community will see your thread and chime in.
 * I can at least offer our support page for infinite scroll here for official guidance:
 * [https://jetpack.com/support/infinite-scroll/](https://jetpack.com/support/infinite-scroll/)
 * So, we wouldn’t be able to help you with that directly, but I hope this points
   you in the right direction!

Viewing 1 replies (of 1 total)

The topic ‘Jetpack Infinite Scroll problem’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [custom post archive](https://wordpress.org/support/topic-tag/custom-post-archive/)

 * 1 reply
 * 2 participants
 * Last reply from: [MadHatter (a11n)](https://wordpress.org/support/users/madhattersez/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/jetpack-infinite-scroll-problem/#post-13760928)
 * Status: resolved