diff --git a/archive.php b/archive.php index b0a1971b..dc2b8d84 100644 --- a/archive.php +++ b/archive.php @@ -29,7 +29,7 @@ get_header(); ?> * If you want to override this in a child theme, then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ - get_template_part( 'content', get_post_format() ); + get_template_part( 'template-parts/content', get_post_format() ); ?> @@ -38,7 +38,7 @@ get_header(); ?> - + diff --git a/inc/jetpack.php b/inc/jetpack.php index 068f0f0f..78e7542c 100644 --- a/inc/jetpack.php +++ b/inc/jetpack.php @@ -13,7 +13,15 @@ function _s_jetpack_setup() { add_theme_support( 'infinite-scroll', array( 'container' => 'main', + 'render' => '_s_infinite_scroll_render', 'footer' => 'page', ) ); -} +} // end function _s_jetpack_setup add_action( 'after_setup_theme', '_s_jetpack_setup' ); + +function _s_infinite_scroll_render() { + while ( have_posts() ) { + the_post(); + get_template_part( 'template-parts/content', get_post_format() ); + } +} // end function _s_infinite_scroll_render \ No newline at end of file diff --git a/index.php b/index.php index 59586c6f..fac92d74 100644 --- a/index.php +++ b/index.php @@ -26,7 +26,7 @@ get_header(); ?> * If you want to override this in a child theme, then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ - get_template_part( 'content', get_post_format() ); + get_template_part( 'template-parts/content', get_post_format() ); ?> @@ -35,7 +35,7 @@ get_header(); ?> - + diff --git a/page.php b/page.php index 2499c35d..e8b4e2e9 100644 --- a/page.php +++ b/page.php @@ -17,7 +17,7 @@ get_header(); ?> - + * If you want to overload this in a child theme then include a file * called content-search.php and that will be used instead. */ - get_template_part( 'content', 'search' ); + get_template_part( 'template-parts/content', 'search' ); ?> @@ -34,7 +34,7 @@ get_header(); ?> - + diff --git a/single.php b/single.php index a50a0464..f269842f 100644 --- a/single.php +++ b/single.php @@ -12,7 +12,7 @@ get_header(); ?> - + diff --git a/content-none.php b/template-parts/content-none.php similarity index 100% rename from content-none.php rename to template-parts/content-none.php diff --git a/content-page.php b/template-parts/content-page.php similarity index 100% rename from content-page.php rename to template-parts/content-page.php diff --git a/content-search.php b/template-parts/content-search.php similarity index 100% rename from content-search.php rename to template-parts/content-search.php diff --git a/content-single.php b/template-parts/content-single.php similarity index 100% rename from content-single.php rename to template-parts/content-single.php diff --git a/content.php b/template-parts/content.php similarity index 100% rename from content.php rename to template-parts/content.php