• Hi all

    When you wanto use gallery name instead of id [can be handy sometimes]
    Us this db action in your template:

    //ref http://wordpress.org/extend/plugins/jj-nextgen-jquery-slider/
    global $wpdb;
    $galleryresult = $wpdb->get_var( “SELECT gid FROM $wpdb->nggallery WHERE name ='”.$cat.”‘” );

    //corresponding id with it’s name is :
    $gid = $galleryresult[0]

    //you can use this then in a shortcode action like:

    $showgallery = “[jj-ngg-jquery-slider gallery='”.$gid.”‘ width=’700′ height=’120′ controlNav=’false’ pausetime=’5000′]”;
    $showgallery = apply_filters(‘the_content’, $showgallery );
    echo $showgallery;

  • The topic ‘[fixed] solution – gallery name instead of id ;-)’ is closed to new replies.