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 );

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

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)