• Resolved lilap

    (@lilap)


    Hello NGG Team!

    I remember reading about this years ago and cannot seem to find the topic.

    I would like to use a shortcode such as [hello] which will display a button based on the gallery type (done by the shortcode).

    I have tried to add this shortcode within the descrption of an image but it does not seem to parse, just displays as text. I have also tried the php echo do_shortcode route but does not work either.

    Years ago, I remember there was a function.php snippet to be added to allow NGG to permit parsing of shortcodes within the description of the images, did you still have this code snippet?

    Thanks heaps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Mihai Ceban

    (@mihaiimagely)

    You can use do_shortcode to create a gallery based on a NextGen Gallery shortcode.

    Here is an example of how to include an album display of our Album id “3”.

    Code:

    $shortcode = do_shortcode('[ngg src="albums" ids=“3" display="basic_compact_album"]');
    echo apply_filters('the_content', $shortcode);
    Thread Starter lilap

    (@lilap)

    Hello, Thanks for your comment, sorry for the misunderstanding, I meant as in the shortcode within the description of the image itself.

    Plugin Support Mihai Ceban

    (@mihaiimagely)

    Unfortunately, NextGen wouldn’t allow parsing shortcodes withing the image’s Description field.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Parsing Shortcode within Image Descrption’ is closed to new replies.