Support » Plugin: NextGEN Gallery - WordPress Gallery Plugin » [Plugin: NextGEN Gallery] Shortcode Slideshow conflicts with Jetpack by plugin

  • Resolved bestsaigon


    I found that Jetback is processing shortcode [slideshow] and generate a error in result webpage before NextGen can reach this shortcode. So, we alway receive a blank space!

    Because Jetpack is official support by WordPress so I modified NextGen 😛

    By change shortcode of NextGen, I can fix this error:

    Step 1: open file </wp-content/plugins/nextgen-gallery/lib/>shortcodes.php

    Step 2: change shortcode name [slideshow] to [ngslideshow]

    Line 29: add_shortcode( ‘slideshow’, array(&$this, ‘show_slideshow’ ) );
    => add_shortcode( ‘ngslideshow’, array(&$this, ‘show_slideshow’ ) );

    Line 100: if ( stristr( $content, ‘[slideshow’ )) {
    => if ( stristr( $content, ‘[ngslideshow’ )) {

    Line 101: $search = “@(?:<p>)*\s*\[slideshow\s*=\s*(\w+|^\+)(|,(\d+)|,)(|,(\d+))\]\s*(?:</p>)*@i”;
    => $search = “@(?:<p>)*\s*\[ngslideshow\s*=\s*(\w+|^\+)(|,(\d+)|,)(|,(\d+))\]\s*(?:</p>)*@i”;

    Line 108: $replace = “[slideshow id=\”{$match[1]}\” w=\”{$match[3]}\” h=\”{$match[5]}\”]”;
    => $replace = “[ngslideshow id=\”{$match[1]}\” w=\”{$match[3]}\” h=\”{$match[5]}\”]”;

    Step 3: in posts, change all shortcodes [slideshow id=x] to [ngslideshow id=x] and it will work like a charm!!!

    Sorry for my bad English.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Justin Tadlock


    WordPress God

    Because Jetpack is official support by WordPress…

    I just wanted to point out that Jetpack is *not* officially supported by WordPress. It is a product made by the company Automattic.



    So, will there be a mod to NextGen soon? I LOVE NextGen Gallery and use it on a number of sites: for one!



    Sorry if this is a silly question – but is bestsaigon saying that if this plugin is activated, my NextGen galleries will go blank? Our site relies pretty heavy on NextGen, and as you can tell by my question, I am no expert.

    Alex Rabe


    it’s up to automatic if they will write a compat patch, but don’t expect this. So under the line you can’t use it in combination with NGG


    Thank you for your post, the changes in the “shortcodes.php” from nggallery are working excellent in conjunction with jetpack. Great!

    Slideshow Latin America for example…Enjoy it 😉

    I have also been searching for a solution to this conflict that Jetpack has with NGG. Thank you for your code. I will attempt to use that code and see if it works for me.

    Yes, this fixed the conflict with Jetpack. I am a little confused why the NGG author Alwx Rabe can’t simply make this modification in his code to resolve the conflict since Automatic apparently won’t fix their code.

    The “problem” with this hack is that it will have to be reapplied every time there is a NGG update.

    since Automatic apparently won’t fix their code

    Why should not Automattic fix their code ? Do they have the sole right to use *any* kind of shortcode and other plugin authors should fix their plugins ?

    Well perhaps they should fix their code.

    But in a situation where they haven’t, then I would think it would be helpful to all of us that use Jetpack and NextGen, to modify NextGen.

    But I guess that’s your prerogative to leave it as it is and let users have to hack your code so that things work with Jetpack.

    Justin Tadlock


    WordPress God

    Have you asked Automattic to make this modification to their plugin? What was their response?

    No I have not personally asked Automatic to modify their code.

    Previous posts regarding this issue have implied that Automatic was made aware of this issue though.

    I’d be happy to notify Automatic. What do you suggest as the most reliable way to do so, so that someone will actually acknowledge that there is an issue?

    And I apologize for my misspelling of Automattic.

    Justin Tadlock


    WordPress God

    I’d start here:

    I have in fact just emailed Automattic from their contact us form to notify them of this apparent conflict between NextGen and Jetpack.

    I have also used the link that Justin Tadlock provided to contact Jetpack support directly.

    Anxiously awaiting a reply .

    My two cent :

    Goto slide.php in JetPack :

    change ( or remove )
    add_shortcode( 'slideshow', 'slideshow_shortcode' );
    add_shortcode( 'wpslideshow', 'slideshow_shortcode' );

    So you can fix this on both sides, maybe this fix is easier (note didn’t tested it)

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: NextGEN Gallery] Shortcode Slideshow conflicts with Jetpack by plugin’ is closed to new replies.