Quantcast
Channel: Topic Tag: database | WordPress.org
Viewing all articles
Browse latest Browse all 11077

ontwerp on "[Plugin: JJ NextGen JQuery Slider] [fixed] solution - gallery name instead of id ;-)"

$
0
0

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;


Viewing all articles
Browse latest Browse all 11077

Trending Articles