0

It doesn't look like the Twenty Seventeen theme supports Infinite Scroll, and adding support doesn't work either if I add the following to functions.php:

add_theme_support( 'infinite-scroll', array(
    'container' => 'content',
    'footer' => 'page',
) );

That just results in a "Load more" button but clicking it results in the button disappearing and no further posts being loaded.

Is it possible to add support for this in the Twenty Seventeen theme?

  • 1
    Seems better aimed at Jetpack developers/support? I would guess they would want for the feature to definitely work with core themes. – Rarst May 19 '17 at 10:52
  • Infinite Scroll support was added to Twenty Seventeen a few months ago. If it doesn't work for you, don't hesitate to post in the Jetpack support forums or contact the support team via email. – jeherve May 23 '17 at 20:52
0

Well, I really should've done this to begin with, but I took a look at my NGINX logs while the infinite scroll would hang, and it turns out the NAXSI web application firewall module I'm using in NGINX is blocking infinite scroll due to anti-XSS/ant-SQL injection policies. Specifically it's because of square brackets and usage of the word "update".

Hopefully this will help anyone else out on Google with a similar issue, but here is what I added to the WordPress NAXSI whitelist to allow infinite scroll:

BasicRule wl:1310,1311 "mz:$BODY_VAR:scripts[]|NAME";
BasicRule wl:1310,1311 "mz:$BODY_VAR:styles[]|NAME";
BasicRule wl:1310,1311 "mz:$BODY_VAR_X:^query_args\[.*\]|NAME";
BasicRule wl:1000 "mz:$BODY_VAR:query_args[update_post_term_cache]|NAME";
BasicRule wl:1000 "mz:$BODY_VAR:query_args[update_post_meta_cache]|NAME";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.