Skip to content

Commit bd4031b

Browse files
committed
Jetpack infinite scroll does not work with theme #119
1 parent 6046bb7 commit bd4031b

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

inc/jetpack.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ function activello_jetpack_setup() {
1515
'type' => 'click',
1616
'container' => 'main',
1717
'footer' => 'page',
18+
'render' => 'activello_jetpack_post_template',
1819
) );
1920
}
2021
add_action( 'after_setup_theme', 'activello_jetpack_setup' );
22+
23+
function activello_jetpack_post_template(){
24+
while( have_posts() ) {
25+
the_post();
26+
get_template_part( 'template-parts/content' );
27+
}
28+
29+
}

style.css

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -908,10 +908,6 @@ ul.children, ul.children li {
908908
border: 1px solid #DADADA;
909909
background: #fff;
910910
color: #a161bf;
911-
-webkit-transition: all 0.5s;
912-
-moz-transition: all 0.5s;
913-
-o-transition: all 0.5s;
914-
transition: all 0.5s;
915911
}
916912
#infinite-handle span:hover {
917913
background-color: #a161bf;
@@ -1840,3 +1836,10 @@ p.logged-in-as {
18401836
.full-width {
18411837
width: 100%;
18421838
}
1839+
1840+
/* Infinite Scroll */
1841+
.infinite-wrap:after {
1842+
content: "";
1843+
display: block;
1844+
clear: both;
1845+
}

0 commit comments

Comments
 (0)