I have installed the NextGEN Gallery plugin and have all my images in albums. Can someone please support me in displaying the NextGEN gallery with the use of the Galleryview plugin?
Is there any easier way?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI have installed the NextGEN Gallery plugin and have all my images in albums. Can someone please support me in displaying the NextGEN gallery with the use of the Galleryview plugin?
Is there any easier way?
With both Nextgen Gallery and Nextgen-Galleryview active, the shortcode [nggallery id=1 template="galleryview"]
should work with 1
being your gallery ID.
// How to fetch NextGEN Gallery by custom query
$sqlquery = "SELECT * FROM wp_ngg_pictures
WHERE gid=3 AND wp_ngg_pictures.gid='wp_ngg_pictures'.galleryid ";
$pageposts = $wpdb->get_results( $sqlquery );
if ( $pageposts ) {
global $post;
foreach ( $pageposts as $post ) {
?><img src="<?php echo $post->path; ?>/<?php echo $post->filename; ?>" alt=""><?php
}
}