Last active
February 3, 2017 08:35
-
-
Save rynaldos-zz/6b0b2d2eabafa514bd48045d1860f24b to your computer and use it in GitHub Desktop.
[WordPress ] Disable Jetpack's Infinite scroll (conditionally)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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