Skip to content

Instantly share code, notes, and snippets.

@vishalbandre
Last active February 27, 2016 05:13
Show Gist options
  • Save vishalbandre/1d08b2f018bd3a68c224 to your computer and use it in GitHub Desktop.
Save vishalbandre/1d08b2f018bd3a68c224 to your computer and use it in GitHub Desktop.
// Jetpack Infinite or Endless Pagination or Scroll Support in Wordpress
add_theme_support('infinite-scroll', array(
'container' => 'content',
'footer' => page,
'footer_callback' => 'branded_footer',
'posts_per_page' => '7',
));
/* Adding custom branded footer to Jetpack Infinite Scroll */
function branded_footer(){
// Branded footer content will go here.
}
function theme_infinite_scroll_settings($args){
if(is_array($args)){
$args['footer_callback'] = 'branded_footer';
return $args;
}
}
add_filter('infinite_scroll_settings', 'theme_infinite_scroll_settings');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment