Apply nextgen-gallery lightbox effect [closed]

I’m not familiar with exactly how nextgen-gallery does it, but typically for lightbox effects you need to add rel=”lightbox” to the image tag for it to work. To do that you’d do something like this: $attr = array( ‘rel’ => “lightbox”, true) )), ); echo wp_get_attachment_image( get_post_meta( get_the_ID(), ‘afp_analysis_chart’ , true), ‘large’, 0, $attr );

How to Organize and Sort Gallery of Images

NextGen gallery isn’t built on top of custom post types, so you won’t be able to easily link your custom Artwork taxonomies with NextGen. Your best bet is to create archive template files in your theme that can display the artwork like NextGen would. The nested approach you mentioned could be accomplished using hierarchical taxonomies. … Read more

NextGEN Conditional Statement [closed]

I figured it out!! My final code looks like: <?php $images = intval($wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->nggpictures”)); $ngg_options = nggGallery::get_option(“ngg_options”); $maxElement = $ngg_options[“galImages”]; if ($images > $maxElement) { echo “duck”; } ?> Basically the code checks see if the number of images IS larger than the number of images displayed per page…if it is larger I … Read more

How can i count the images that are atacht to NextGEN Gallery

Assuming you actually have something in the $gallery object (hint: confirm that by print_r($gallery) in your template), then your code should work. Perhaps step back and leave the database stuff to NextGEN, just count the image IDs: global $nggdb; $poze = get_field(‘poze’); if ($poze && count($poze)) { $galleryID = $poze[0][‘ngg_id’]; $imageIDs = $nggdb->get_ids_from_gallery($galleryID); $count = … Read more

NextGEN Gallery – open all images on page in fancybox [closed]

Yes, NGG can be used exactly like you described it. under Other Settings you find the Lightbox Effects where you can select Fancybox, and click Show Advanced Options. That’s where you can find/set class=”fancybox” rel=”gallery” and you’re good to go. To show single images you can use the shortcode [singlepic id=47 …], for instance.

Retrieving links and names of images from a NextGEN gallery [closed]

Ok, this has worked for me. <?php // get the track list global $nggdb; $gallery = $nggdb->get_gallery ($galleryID, ‘sortorder’, ‘ASC’, true, 0, 0); ?> <div id=”tracklist”> <?php foreach($gallery as $image) { ?> <div class=”single_image” id=”image-<?php echo $image->pid; ?>”> <a href=”https://wordpress.stackexchange.com/questions/75475/<?php the_permalink() ?>&pid=<?php echo $image->pid;?>” title=”<?php echo $image->title; ?>”> <?php echo $image->alttext; ?> </a> </div> <?php … Read more