• Question: How do I get the gallery description in my sidebar?

    The gallery template (gallery.php) uses $gallery within an if statement. Of course, I can’t access that variable outside of the if.. is there a way I can make it accessible? Or another way around this?

    Thank you. so. much. (if you can help)

    http://wordpress.org/extend/plugins/nextgen-gallery/

Viewing 1 replies (of 1 total)
  • Thread Starter Jason

    (@jasonhuk)

    I may have solved my own problem.. but I’d like tos ee if anybody has a better suggestion.

    In gallery templates I added:

    global $gal;
     $gal = (array) $gallery;

    Creating an array from the object $gallery. I tested it using:

    global $gal;
    print_r($gal);

    And success! Hope this helps anybody else.

    Dear PHP gurus, is this good enough?

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: NextGEN Gallery] Referencing $gallery outisde of gallery.php’ is closed to new replies.