Infinite Scroll
-
Does anyone have any code to get the genesis grid plugin to work with jetpack’s infinite scroll? I’m trying to use code I found online, but it only shows one post at a time (instead of a row of three that I have set in the grid plugin). I’m using genesis sample theme.
//* Add a CSS ID to main element add_filter( 'genesis_attr_content', 'custom_attributes_content' ); function custom_attributes_content( $attributes ) { if ( is_home() || is_archive() || is_page('blog') ) { $attributes['id'] = 'main-content-area'; } return $attributes; } //* Add support for Jetpack infinite scroll add_theme_support( 'infinite-scroll', array( // 'type' => 'click', 'container' => 'main-content-area', 'render' => 'genesis_do_loop' ) ); //* Remove archive pagination // add_action ( 'genesis_after_entry', 'sk_remove_pagination' ); function sk_remove_pagination() { remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' ); }
- The topic ‘Infinite Scroll’ is closed to new replies.