Conflicts between Jetpack and Stargazer

7 Replies ·

  1. There is a conflict between the Carousel, Infinite scroll Jetpack modules, and Stargazer. When applying the Carousel to a gallery, the Carousel won’t display and instead shows the images in a standard gallery format. The infinite scroll simply doesn’t work when activated. When switching the theme to TwentyTen or TwentyEleven, both modules work just fine.

  2. Justin Tadlock

    The reason for this is because Jetpack disables its filters when it detects anything else going on with galleries instead of simply overwriting things (very easy to do with a later filter).

    Anyway, this is listed in their known issues: http://jetpack.me/support/getting-started-with-jetpack/known-issues/

    You can download their plugin available here: http://jetpackme.files.wordpress.com/2013/08/jp-rm-cleaner-gallery.zip

    Or, you can drop this one line of code into your child theme’s `functions.php` file (inside the child theme setup function):

    `
    remove_theme_support( ‘cleaner-gallery’ );
    `

    This is assuming you don’t also have the Cleaner Gallery plugin installed.

  3. Jeffro

    Nope, we’re not using the Cleaner Gallery plugin. Will place the code in our child theme’s functions.php file. Thanks! New forums are looking spiffy btw.

  4. Justin Tadlock

    Make sure to put it within the child theme setup function. I was just editing my above post to say that when you commented.

  5. Jeffro

    By the way, we have this in the child theme’s functions.php file for Infinite Scroll but it doesn’t work.

    `/*
    * Add Jetpack’s Infinite Scroll
    */

    add_theme_support( ‘infinite-scroll’, array(
    ‘container’ => ‘content’,
    ‘footer’ => false,
    ‘wrapper’ => false,
    ‘click_handle’ => false,
    ) ); `

    Is this a related issue to Carousel or something different?

  6. Justin Tadlock

    I don’t know anything about that plugin feature. It wouldn’t be related to galleries though.

  7. Justin Tadlock

    From what I’ve been able to gather, you need a custom callback function for handling infinite scroll. It would only automatically work in the off-chance that a theme used `content*.php` templates within its root folder. Since this is a non-standard WP theme feature, most WP themes would have to build a custom `render` callback function.

    For reference: http://jetpack.me/support/infinite-scroll/

    I believe your `add_theme_support()` call should be:

    `
    add_theme_support(
    ‘infinite-scroll’,
    array(
    ‘container’ => ‘content’,
    ‘footer’ => false,
    ‘wrapper’ => false,
    ‘click_handle’ => false,
    ‘render’ => ‘my_jetpack_infinite_scroll_render’,
    )
    );
    `

    The callback function would look something like following. This is entirely untested in based solely on their documentation:

    `
    function my_jetpack_infinite_scroll_render() {

    while ( have_posts() ) {
    the_post();
    hybrid_get_content_template();
    }
    }
    `

    I also don’t really like the idea of putting this sort of thing in a child theme because it has a higher potential of breaking with a future update than other things.