• Resolved TiKu

    (@tiku)


    Hi,

    Is there a reason why it is not possible to exclude images from a gallery using the shortcode like this?
    [nggallery images_per_page="4" number_of_columns="4" exclusions="1,2" id=253]

    I’m aware that images can be excluded from galleries via gallery management. An author of my website believes that it has been possible via shortcode in earlier versions. In current version it does not seem to work anymore and I’m not sure whether it is a bug or just works as designed (and never has been possible).

    So is it a bug or a feature?

    Regards
    TiKu

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter TiKu

    (@tiku)

    Hmm, not 100% sure, but it seems like a bug in wp-Typography plugin.

    As the author of wp-Typography, I don’t see how that is possible: Either wp-Typography’s content filter runs before NGG’s, then the shortcode will be messed up by the wp-Typography filter and not parsed by NGG, or it runs after, then it can’t interfere with NGG.

    Am I missing something?

    Thread Starter TiKu

    (@tiku)

    Sorry for crossposting.
    I noticed two things after starting this thread:

    1. After I deactivated and then reactivated wp-Typography once, NextGen’s popup window for inserting a new gallery into the post did work all of a sudden. The HTML code that it generates even works. But how can deactivation and reactivation of a plugin fix such things?
    2. The NGG shortcode still does not work. The shortcode is displayed as is, with wp-Typography having the quotation marks replaced by typographic quotation marks – I guess that’s why NextGen cannot process the shortcode anymore.

    So this seems to be a quite complex bug and I’m not sure how to reproduce it, given that the system healed itself.

    My question to photocrati is: Can you confirm that this shortcode is actually correct? I mean, does it contain any illegal attributes?
    [nggallery images_per_page="4" number_of_columns="4" exclusions="1,2" id=253]

    I’m asking this, because accoring to the sourcecode wp-Typography filters actually should be run after NGG filters. But if it runs after NGG, how can it replace quotation marks within a NGG shortcode? Shouldn’t the shortcode already be replaced by HTML code at this time?

    Regards
    TiKu

    Plugin Contributor photocrati

    (@photocrati)

    @tiku – You might look at using a current NextGEN Gallery shortcode versus the NextGEN Legacy version you are trying to work with … for example:

    [ngg_images gallery_ids=1 display_type=photocrati-nextgen_basic_thumbnails images_per_page=4 number_of_columns=4 exclusions="1,2"]

    Also to note, with your example you are excluding images with ID 1 and 2 … if they are not in gallery ID 253 then obviously they will not be excluded, the example I provided above works and is based on one of my test galleries.

    Thanks!

    – Cais.

    PS: I have not tested in conjunction with wp-Typography to see if there are any related issues as the above seems to discount that as a possible problem.

    Thread Starter TiKu

    (@tiku)

    Ah, I wasn’t aware that there are new shortcodes. I’ll try on sunday. I’m away for a couple of days. Thanks a lot.

    TiKu

    Plugin Contributor photocrati

    (@photocrati)

    @tiku – Most of the NextGEN Legacy style shortcodes still work but we recommend the new (version 2.0+) version of the NextGEN Gallery shortcodes to be more forward compatible.

    Thanks!

    – Cais.

    Thread Starter TiKu

    (@tiku)

    Your newer shortcode works, thanks.

    Plugin Contributor photocrati

    (@photocrati)

    @tiku – Thanks for the update!

    – Cais.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Excluding images from galleries via shortcode’ is closed to new replies.