• luxurytraveldiary

    (@luxurytraveldiary)


    Hi, Upgraded Jetpack to 3.2, (from 3.1), yesterday and now experiencing some weird behaviour re: Infinite Scroll.

    We’ve had Infinite Scroll setup and working for a long time, but since pushing the 3.2 upgrade to our live env the pagination UI has appeared above the Infinite scroll ‘click’ bar, and refuses to budge. No issues detected when the click bar is disabled but this functionality does not provide the user experience we’re after.

    We reset the ‘Scroll Infinitely’ setting, no dice the pagination UI refused to go away. Disabled all plugins and cleared out functions.php to detect any conflicts, none were found and the behaviour persisted.

    Nothing unusual about our infinite scroll config:

    $args['posts_per_page'] = 4;
    $args['footer'] = false;
    $args['type'] = 'click';
    $args['wrapper'] = false;

    So we looked under the hood. We have a dev env almost identical to our live env, running Jetpack 3.2 and not displaying the same behaviour, so the first step was to compare the source of the two home pages. We discovered the live instance is missing a call to include the following two style sheets:

    /wp-content/plugins/jetpack/modules/infinite-scroll/infinity.css
    /wp-content/plugins/jetpack/modules/infinite-scroll/themes/twentyfourteen.css

    The first omission is not an issue as a new style sheet was detected, (jetpack.css), a combined and minified version of the css required by jetpack elements, it includes the foundation ‘infinite’ styles, but obviously not the styles specific to our theme, (twentyfourteen.css), which actually hide the pagination UI.

    So quick and dirty fix – re-enqueue the missing .css making jetpack_css a dependancy.

    wp_enqueue_style('infinity-twentyfourteen-css','/wp-content/plugins/jetpack/modules/infinite-scroll/themes/twentyfourteen.css?ver=20131118',array('jetpack_css'));

    My question is why is this happening in the first place, and why is the behaviour not present on a pretty identical setup, (the only difference being due to firewall restrictions and jetpack being in development mode on our dev instance – assume this is why individual style sheets and not jetpack.css is used in this case).

    Would really love to get to the bottom of this, any help gratefully received!

  • The topic ‘[Plugin: Jetpack] Pagination UI persists when Infinite Scroll enabled’ is closed to new replies.