Skip to content

Instantly share code, notes, and snippets.

@rynaldos-zz
Last active February 3, 2017 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rynaldos-zz/6b0b2d2eabafa514bd48045d1860f24b to your computer and use it in GitHub Desktop.
Save rynaldos-zz/6b0b2d2eabafa514bd48045d1860f24b to your computer and use it in GitHub Desktop.
[WordPress ] Disable Jetpack's Infinite scroll (conditionally)
function _rsp_disable_jetpack_infinite_scroll_conditionally() {
if ( true === my_conditionals() ) {
remove_theme_support( 'infinite-scroll' );
}
}
add_action( 'template_redirect', '_rsp_disable_jetpack_infinite_scroll_conditionally', 9 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment