2013-02-03 07:03:40 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2015-07-01 15:21:44 +00:00
|
|
|
* Jetpack Compatibility File.
|
|
|
|
*
|
|
|
|
* @link https://jetpack.me/
|
2013-02-03 07:03:40 +00:00
|
|
|
*
|
2013-02-25 07:15:14 +00:00
|
|
|
* @package _s
|
2013-02-03 07:03:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add theme support for Infinite Scroll.
|
2015-05-05 09:26:05 +00:00
|
|
|
* See: https://jetpack.me/support/infinite-scroll/
|
2013-02-03 07:03:40 +00:00
|
|
|
*/
|
2013-05-20 11:02:30 +00:00
|
|
|
function _s_jetpack_setup() {
|
2013-02-03 07:03:40 +00:00
|
|
|
add_theme_support( 'infinite-scroll', array(
|
2013-07-30 19:12:45 +00:00
|
|
|
'container' => 'main',
|
2015-04-29 01:42:12 +00:00
|
|
|
'render' => '_s_infinite_scroll_render',
|
2013-02-03 07:03:40 +00:00
|
|
|
'footer' => 'page',
|
|
|
|
) );
|
2015-04-29 01:42:12 +00:00
|
|
|
} // end function _s_jetpack_setup
|
2013-05-20 11:02:30 +00:00
|
|
|
add_action( 'after_setup_theme', '_s_jetpack_setup' );
|
2015-04-29 01:42:12 +00:00
|
|
|
|
2015-05-27 17:49:01 +00:00
|
|
|
/**
|
|
|
|
* Custom render function for Infinite Scroll.
|
|
|
|
*/
|
2015-04-29 01:42:12 +00:00
|
|
|
function _s_infinite_scroll_render() {
|
|
|
|
while ( have_posts() ) {
|
|
|
|
the_post();
|
|
|
|
get_template_part( 'template-parts/content', get_post_format() );
|
|
|
|
}
|
2015-05-27 17:49:01 +00:00
|
|
|
} // end function _s_infinite_scroll_render
|