• Hi I have an issue with utilizing WordPress Jetpack’s Tiled Mosaic Gallery when using Visual Composer. When you view a post on a mobile device, it doesn’t display the Mosaic Gallery correctly – it is too large and cut off. (Make sure to use an actual mobile device and not just a browser sized down) I turned off VC plugin and the Gallery worked perfectly. I contacted VC directly and they said that since Jetpack is a third party plugin they don’t guarantee support (which I find a disappointing since Jetpack is part of Automattic/Wordpress).

    It seems to be a js resizing issue where the Jeptpack gallery isn’t recognizing its container’s width on mobile

    I tried viewing the console but the don’t have any errors related to this – only warning and trying to fix them didn’t seem to help.

    I could really use your help or direction in locating the bug which causes JetPack tiled galleries to overflow and not resize correctly for mobile devices.

    Here is a link for the example.
    http://whereis.jsaying.com/2013/09/14/pittsburgh-pennsylvania/

    Thanks I appreciate the help!
    JJ

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    The gallery appears to work well right now. Is VC still disabled? Would you mind activating it again so I can take a closer look at the problem?

    Thanks!

    Thread Starter jjsereday

    (@jjsereday)

    Ok try again. 🙂

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Thanks! I can reproduce the issue now, and as you mentioned it does seem like an conflict between the content width imposed by VC and Jetpack’s Tiled Gallery JS.

    Could you check your theme’s functions.php file, and make sure it includes a $content_width value? If not, could you add one and let me know if it helps?
    https://codex.wordpress.org/Content_Width

    Thanks!

    Thread Starter jjsereday

    (@jjsereday)

    Hey Jeremy, yes it has it. The Theme works fine on Mobile when the gallery is not inside a Visual Composer post.

    This is the Themes function file code for content_width

    * @global int $content_width
    */
    function wpvoyager_content_width() {
    $GLOBALS[‘content_width’] = apply_filters( ‘wpvoyager_content_width’, 1260 );
    }
    add_action( ‘after_setup_theme’, ‘wpvoyager_content_width’, 0 );

    if ( ! isset( $content_width ) ) $content_width = 1260;
    /**

    Thread Starter jjsereday

    (@jjsereday)

    I have a feeling it has something to do with Visual Composers columns. If I keep VC plugin turned on and create a gallery but don’t use the VC shortcodes it still works.

    I have a different theme for another site which uses a modified version of Visual Composer and I do remember there being an issue with the jet pack tile gallery and using short codes like tabs where only the first tab would show the gallery but the second and third tab would not show any additional galleries.

    Their solution was to trigger a “resize” in the init.js file (heres the code)

    $tabbedClickCount++;
    and add this in directly after:

    $(window).trigger('resize');

    Do you think we need to add a resize trigger for visual composer columns or rows?

    Thanks

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    That’s interesting. If they do indeed resize the page with JavaScript after loading, then it will definitely conflict with other plugins relying on JavaScript to calculate the width of a page.

    I’m not familiar with VC so I can’t tell you how to implement this, but it would definitely be worth a try!

    Let me know how it goes!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Jetpack Galleries not working on Mobile with Visual Composer’ is closed to new replies.