WordPress.org

Forums

[Theme: Matala] I'm trying to add support to jetpack's Infinite Scroll (3 posts)

  1. Darkkurama
    Member
    Posted 2 years ago #

    So I was trying to add support for the infinite scroll feature from the latest jetpack update. So far, with partial success as "adapting" the code is causing a bug in the jetpack's own sharing buttons (facebook, twitter), making them show numbers like "111" or "333" in said buttons when the infinite scroll action is triggered.

    The code I added to functions.php of the matala theme is the following:

    if ( ! function_exists( 'matala_infinite_scroll_init' ) ) :
    /**
     *  Add theme support for infinite scroll
     */
    function matala_infinite_scroll_init() {
    	add_theme_support( 'infinite-scroll', array(
    	'type'           => 'scroll',
    	'container'      => 'content'
    	) );
    }
    add_action( 'after_setup_theme', 'matala_infinite_scroll_init' );
    endif;

    It is somehow interfering with the sharing buttons from the own jetpack plugin. Tried with firefox and IE, latest versions. I know sorting this out is not going to be easy, but, meh, I'm trying. Any clue? Thanks!

  2. Darkkurama
    Member
    Posted 2 years ago #

    Couldn't add my site to the original post... Well its this one. Thanks.

  3. Christopher Anderton
    Member
    Posted 2 years ago #

    add_theme_support( 'infinite-scroll', array('container' => 'content', 'footer' => 'colophon') );

    ?

Topic Closed

This topic has been closed to new replies.

About this Topic