Support » Plugin: WordPress Gallery Plugin - NextGEN Gallery » Album description

  • Resolved bengo-matus


    for years I used custom template with this code to show the album description. It stopped working. What code should I use?

     $my_gallery_id = $displayed_gallery->container_ids[0];  
     $my_result = mysql_query("SELECT * FROM wp_ngg_gallery WHERE gid='".$my_gallery_id."' LIMIT 1");  
     $my_row = mysql_fetch_assoc($my_result);  
     if($my_row['galdesc'] != '') {  
          echo $my_row['galdesc'];
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Imagely



    Would you mind sharing all this information in our bug support form?

    We might need to ask one of our developers about this particular code.

    – Gaby

    • This reply was modified 3 years, 9 months ago by Imagely.
    Thread Starter bengo-matus


    Ok, but I’m just asking how to call the function for showing the album description.

    Plugin Author Imagely


    Because our displayed galleries can combine multiple albums together (container_ids=1,2,3) the $album variable will have information on the first album in the container_ids list (or the only album, if there’s only one entry in container_id) where $albums is an array of all the albums to show. Either way the $album / entries in the $albums array are just stdClass objects and they hold the albumdesc attribute

    Assuming you’re not combining multiple albums you could update your template to look like:

    if (!empty($album->albumdesc))
        echo $album->albumdesc;

    – Becky

    *With this solution above from our developers ^ I am going to mark this thread as resolved. Feel free to continue adding comments below 🙂

    Thread Starter bengo-matus


    I wrote it wrong, but I thought the description in particular gallery.
    Will something like $gallery->galdesc work?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Album description’ is closed to new replies.