• Resolved taj114

    (@taj114)


    I am using a shortcode like this. I have the gallery created and named as “LIFE”, has 6 images and I was looking for random sorting feature. But the page displays “we cannot display this gallery”. Here is the short code:[ngg src=”galleries” ids=”1″ display=”basic_thumbnail” order_by=’rand()’]

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • As a fellow user, you could try two small tweaks to narrow it down:

    a) Change “basic_thumbnail” to just “thumbnail”; and,
    b) Delete the order_by part.

    That should leave you with the “simplest” of short codes:

    [ngg src=”galleries” ids=”1″ display=”thumbnail”]

    If that doesn’t work, is it possible it isn’t gallery 1?

    PolyWogg

    Thread Starter taj114

    (@taj114)

    I just need the random sorting feature, so I can’t remove the order_by part. I am using the free version by the way. Is there any restriction on shortcodes for free/paid versions?

    I don’t think so, but you’ll likely have to wait for official support (running a bit slower these days than normal). I was more suggesting that you try the other code to make sure that part is working i.e. get the other part working before you tweak the random side. Good luck…

    P.

    I tried it on my site, and similar code generates the identical error. If I put it in using the block, I get:

    [ngg src=”galleries” ids=”3″ display=”basic_thumbnail” thumbnail_crop=”0″ order_direction=”DESC”]

    The link I saw had “order_by=’rand()’” but I’m wondering if that’s a typo…the normal format would look more like this:

    [ngg src=”galleries” ids=”3″ display=”basic_thumbnail” thumbnail_crop=”0″ order_by=”rand()”]

    I have caching installed, so it might not show properly for me, but the initial load was different than default.

    However, it does note that not all webhosts will allow the RAND command to be used.

    P.

    Benjamin

    (@benjaminowens)

    Thanks again PollyWogg!

    NextGEN Gallery (the free plugin) has NO restrictions whatsoever; our premium plugin adds additional features but there is nothing held back to unlock.

    I have two thoughts:

    1) It could be that the text you’re using has specially styled quotation marks; they’re pretty (and automatically used by document editors like MS Word) but WordPress cannot handle them. Can you copy / paste this and see if it functions:
    [ngg src="galleries" ids="1" display="basic_thumbnail" order_by="rand()"]

    2) As PollyWogg said some web hosts disable random ordering in their database servers. We have an option under Other Options > Misc to enable an alternate random-image ordering algorithm: it’s a little slower and less actually random (and not at all random if your gallery has less than 20 or so images) but it’s possibly a bandage.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘nextGen shortcode not working’ is closed to new replies.