Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Exemplo de query para pegar as imagens da galeria id = 1, do NextGen Gallery
- $imagens = $wpdb->get_results($wpdb->prepare("SELECT ".$wpdb->prefix."ngg_pictures.pid,".$wpdb->prefix."ngg_pictures.description, ".$wpdb->prefix."ngg_pictures.alttext FROM ".$wpdb->prefix."ngg_pictures WHERE ".$wpdb->prefix."ngg_pictures.galleryid = '1' ORDER BY ".$wpdb->prefix."ngg_pictures.sortorder"), ARRAY_A);
- echo "<ul id='jcarousel-galeria'>";
- foreach ($imagens as $imagem):
- echo "<li><img src="http://www.SEUSITE.com.br/wp-content/gallery/NOME_DA_GALERIA/". $imagem['filename']. " width="75" height="75" alt=" .$imagem['alttext']. " /></li>";
- endforeach;
- echo "</ul>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement