Forums

[resolved] [Plugin: NextGEN Gallery] Fetch data programatically, from the template files (4 posts)

  1. anothertrad
    Member
    Posted 2 years ago #

    Hi, I just need a way to fetch a specifically gallery by name and be able to iterate over the pictures/thumbnails/link*, and do whatever I can with it.

    * that would be my "image" object :)

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

  2. anothertrad
    Member
    Posted 2 years ago #

    ok, done with simple wpdb

  3. anothertrad
    Member
    Posted 2 years ago #

    for the record:

    $ngggalleryname = 'test';
    $previewpicdata = $wpdb->get_row(" SELECT * FROM $wpdb->nggallery  where name='$ngggalleryname'");
    $images = $wpdb->get_results(" SELECT * FROM $wpdb->nggpictures  where galleryid=$previewpicdata->gid");

    foreach...`

  4. Alex Rabe
    Member
    Posted 2 years ago #

    Or you use this way : nggdb::get_gallery( $galleryID )

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.