diff --git a/modules/infinite-scroll/infinity.php b/modules/infinite-scroll/infinity.php index e82c104098246..1c9f747111281 100644 --- a/modules/infinite-scroll/infinity.php +++ b/modules/infinite-scroll/infinity.php @@ -355,10 +355,14 @@ function enqueue_spinner_scripts() { * Adds an 'infinite-scroll' class to the body. */ function body_class( $classes ) { - $classes[] = 'infinite-scroll'; - - if ( 'scroll' == self::get_settings()->type ) - $classes[] = 'neverending'; + // Do not add infinity-scroll class if disabled through the Reading page + $disabled = '' === get_option( self::$option_name_enabled ) ? true : false; + if ( ! $disabled ) { + $classes[] = 'infinite-scroll'; + + if ( 'scroll' == self::get_settings()->type ) + $classes[] = 'neverending'; + } return $classes; }