• Resolved katmac_aus

    (@katmac_aus)


    Hi. I am using JetPack infinite scroll. It works fine on my category, archives etc – wherever I have posts.

    However it seems to be loading on the author page and I dont want it to. The reason is that on the author page it shows the error notice:

    Notice: Trying to get property of non-object in xxxx/wp-content/plugins/jetpack/modules/infinite-scroll/infinity.php on line 375

    I add inifinite scroll support via

    add_theme_support( ‘infinite-scroll’, array(
    ‘type’ => ‘scroll’,
    ‘footer_widgets’ => false,
    ‘container’ => ‘scrollable’,
    ‘wrapper’ => true,
    ‘render’ => false,
    ‘posts_per_page’ => false,
    ‘footer’ => ‘colophon’,
    ) );

    And on my author page I dont have an id called “scrollable”. So why is it loading inifinite scroll on the author page? How to I get it not to do this?

Viewing 1 replies (of 1 total)
  • Thread Starter katmac_aus

    (@katmac_aus)

    Found the solution. I added the following to my function file to stop inifinite scroll from loading on the author template

    function my_jetpack_infinite_scroll_supported() {
        return current_theme_supports( 'infinite-scroll' ) && ( ! is_author());
    }
    add_filter( 'infinite_scroll_archive_supported', 'my_jetpack_infinite_scroll_supported' );
Viewing 1 replies (of 1 total)
  • The topic ‘JetPack Infinite Scroll – error on author page’ is closed to new replies.