Title: pagination?
Last modified: August 21, 2016

---

# pagination?

 *  Resolved [JS](https://wordpress.org/support/users/jsylvia90/)
 * (@jsylvia90)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/)
 * Hi,
    Install is NextGEN Gallery by Photocrati Version 2.0.40
 * I have updated the pagination on several previous versions on different sites(
   in the gallery.php file without issue). Typically simple to do.
 * With this new site it took me awhile to find the gallery.php but I finally found
   it here:
 * wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/
   ngglegacy/view
 * I made the simple edit of adding the pagination code (copied kept the bottom)
   above the thumbnail code:
 *  <!– Pagination –>
    <?php echo $pagination ?>
 *  <!– Thumbnails –>
    <?php $i = 0; ?> <?php foreach ( $images as $image ) : ?>
 * …
 * I’ve never had a problem before but for this site it just doesn’t show on top.
   I did some other tests and I think I may not be looking in the right directory
   or perhaps editing the wrong gallery.php file. I did refresh and clear caches
   and it is just not updating with what I’ve done. (Deleted files too, so I suspect
   something is somewhere else, but I’ve searched for hours.)
 * This site is brand new in beta with all the latest WordPress has to offer.
 * I just need the pagination to show above as well as below the thumbnails and 
   it used to be so easy. I’m sure its something simple that I’m doing wrong. Any
   suggestions?
 * It used to be so easy.
    Thanks! JS
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/#post-4637305)
 * [@jsylvia90](https://wordpress.org/support/users/jsylvia90/) – We recently discovered
   there was an issue withe `$pagination` variable not being populated with the 
   expected data causing issues with custom templates.
 * The corrections for this issue should be in our latest beta version, please see
   this page for more details: [http://www.nextgen-gallery.com/nextgen-gallery-latest-beta/](http://www.nextgen-gallery.com/nextgen-gallery-latest-beta/)
 * Thanks!
 * – Cais.
 *  Thread Starter [JS](https://wordpress.org/support/users/jsylvia90/)
 * (@jsylvia90)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/#post-4637315)
 * So I’m not going crazy!… Thanks. I will check it out. 🙂
 *  Thread Starter [JS](https://wordpress.org/support/users/jsylvia90/)
 * (@jsylvia90)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/#post-4637317)
 * Hi and thanks for your input.
 * I did the update now shows NextGen version Version 2.0.55. All seems okay as 
   far as function of the gallery (whew), but it still doesn’t show the navigation
   on the top. So still somewhat stumped, but I still wonder if maybe I’m editing
   the wrong file (when I delete the gallery.php it still works AND I did clear 
   my cache. I don’t have any other NextGen extensions either.
 * I’m editing the gallery.php file here:
 * /1029/public_html/vote_gina_derossi/wp-content/plugins/nextgen-gallery/products/
   photocrati_nextgen/modules/ngglegacy/view
 * Here is a copy of the gallery.php code:
 * <?php
    /** Template Page for the gallery overview
 * Follow variables are useable :
 *  $gallery : Contain all about the gallery
    $images : Contain all images, path,
   title $pagination : Contain the pagination content
 *  You can check the content when you insert the tag <?php var_dump($variable) ?
   >
    If you would like to show the timestamp of the image ,you can use <?php echo
   $exif[‘created_timestamp’] ?> **/ ?> <?php if (!defined (‘ABSPATH’)) die (‘No
   direct access allowed’); ?><?php if (!empty ($gallery)) : ?>
 * <div class=”ngg-galleryoverview” id=”<?php echo $gallery->anchor ?>”>
 * <?php if ($gallery->show_slideshow) { ?>
    <!– Slideshow link –> <div class=”slideshowlink”
   > slideshow_link) ?>”> <?php echo $gallery->slideshow_link_text ?>  </div> <?
   php } ?>
 * <?php if ($gallery->show_piclens) { ?>
    <!– Piclense link –> <div class=”piclenselink”
   > piclens_link) ?>”> <?php _e(‘[View with PicLens]’,’nggallery’); ?>  </div> 
   <?php } ?>
 *  <!– Pagination –>
    <?php echo $pagination ?>
 *  <!– Thumbnails –>
    <?php $i = 0; ?> <?php foreach ( $images as $image ) : ?>
 *  <div id=”ngg-image-<?php echo $image->pid ?>” class=”ngg-gallery-thumbnail-box”
   <?php echo $image->style ?> >
    <div class=”ngg-gallery-thumbnail” > imageURL)?
   >” title=”<?php echo esc_attr($image->description) ?>” data-src=”<?php echo nextgen_esc_url(
   $image->imageURL); ?>” data-thumbnail=”<?php echo nextgen_esc_url($image->thumbnailURL);?
   >” data-image-id=”<?php echo esc_attr($image->pid); ?>” data-title=”<?php echo
   esc_attr($image->alttext); ?>” data-description=”<?php echo esc_attr($image->
   description); ?>” <?php echo $image->thumbcode ?> > <?php if ( !$image->hidden){?
   > <img title=”<?php echo esc_attr($image->alttext) ?>” alt=”<?php echo esc_attr(
   $image->alttext) ?>” src=”<?php echo nextgen_esc_url($image->thumbnailURL) ?>”
   <?php echo $image->size ?> /> <?php } ?>  </div> </div>
 *  <?php if ( $image->hidden ) continue; ?>
    <?php if ($gallery->columns > 0): ?
   > <?php if ((($i + 1) % $gallery->columns) == 0 ): ?> <br style=”clear: both”/
   > <?php endif; ?> <?php endif; ?> <?php $i++; ?>
 *  <?php endforeach; ?>
 *  <!– Pagination –>
    <?php echo $pagination ?>
 * </div>
 * <?php endif; ?>
 * ************
 * Thanks again, its still a great plugin and would be greater if I could get it
   like my others with the nav on the top too.
 * JS
 *  [tizz](https://wordpress.org/support/users/tizz/)
 * (@tizz)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/#post-4637320)
 * [@jsylvia90](https://wordpress.org/support/users/jsylvia90/) You are still able
   to edit your post, so wrap your code between “code” tag or use a service like
   [pastebin](http://pastebin.com/)
 *  Thread Starter [JS](https://wordpress.org/support/users/jsylvia90/)
 * (@jsylvia90)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/#post-4637405)
 * Woops! Not letting me edit, so let me try your suggestion here:
 * and here:
 *     ```
       <?php
       /**
       Template Page for the gallery overview
   
       Follow variables are useable :
   
       	$gallery     : Contain all about the gallery
       	$images      : Contain all images, path, title
       	$pagination  : Contain the pagination content
   
        You can check the content when you insert the tag <?php var_dump($variable) ?>
        If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
       **/
       ?>
       <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
   
       <div class="ngg-galleryoverview" id="<?php echo $gallery->anchor ?>">
   
       <?php if ($gallery->show_slideshow) { ?>
       	<!-- Slideshow link -->
       	<div class="slideshowlink">
       		<a class="slideshowlink" href="<?php echo nextgen_esc_url($gallery->slideshow_link) ?>">
       			<?php echo $gallery->slideshow_link_text ?>
       		</a>
       	</div>
       <?php } ?>
   
       <?php if ($gallery->show_piclens) { ?>
       	<!-- Piclense link -->
       	<div class="piclenselink">
       		<a class="piclenselink" href="<?php echo nextgen_esc_url($gallery->piclens_link) ?>">
       			<?php _e('[View with PicLens]','nggallery'); ?>
       		</a>
       	</div>
       <?php } ?>
   
       	<!-- Pagination -->
        	<?php echo $pagination ?>
   
       	<!-- Thumbnails -->
           <?php $i = 0; ?>
       	<?php foreach ( $images as $image ) : ?>
   
       	<div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
       		<div class="ngg-gallery-thumbnail" >
       			<a href="<?php echo nextgen_esc_url($image->imageURL) ?>"
                      title="<?php echo esc_attr($image->description) ?>"
                      data-src="<?php echo nextgen_esc_url($image->imageURL); ?>"
                      data-thumbnail="<?php echo nextgen_esc_url($image->thumbnailURL); ?>"
                      data-image-id="<?php echo esc_attr($image->pid); ?>"
                      data-title="<?php echo esc_attr($image->alttext); ?>"
                      data-description="<?php echo esc_attr($image->description); ?>"
                      <?php echo $image->thumbcode ?> >
       				<?php if ( !$image->hidden ) { ?>
       				<img title="<?php echo esc_attr($image->alttext) ?>" alt="<?php echo esc_attr($image->alttext) ?>" src="<?php echo nextgen_esc_url($image->thumbnailURL) ?>" <?php echo $image->size ?> />
       				<?php } ?>
       			</a>
       		</div>
       	</div>
   
           <?php if ( $image->hidden ) continue; ?>
           <?php if ($gallery->columns > 0): ?>
               <?php if ((($i + 1) % $gallery->columns) == 0 ): ?>
                   <br style="clear: both" />
               <?php endif; ?>
           <?php endif; ?>
           <?php $i++; ?>
   
        	<?php endforeach; ?>
   
       	<!-- Pagination -->
        	<?php echo $pagination ?>
   
       </div>
   
       <?php endif; ?>
       ```
   
 *  Thread Starter [JS](https://wordpress.org/support/users/jsylvia90/)
 * (@jsylvia90)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/#post-4637406)
 * Sorry, I don’t post often and don’t know all the nuances yet…
 * Anyway the above pasted code is in the gallery.php file that I found. the directory
   path is /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/
   ngglegacy/view
 * However the very weird part is that after I uploaded the above edited file and
   it didn’t work I tested by deleting it from the remote host server… strangely
   the gallery still seemed to work fine… this leads me to believe I may be editing
   the wrong file, but for the life of me I can’t find anything else. Beta update
   didn’t resolve either.
 * Thanks for your note!
    JS
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/#post-4637443)
 * [@jsylvia90](https://wordpress.org/support/users/jsylvia90/) – You still have
   to select that template, even the “gallery” one as it is not used by default.
 * Thanks!
 * – Cais.
 *  Thread Starter [JS](https://wordpress.org/support/users/jsylvia90/)
 * (@jsylvia90)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/#post-4637447)
 * Thanks… that was it!! 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘pagination?’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [JS](https://wordpress.org/support/users/jsylvia90/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/pagination-111/#post-4637447)
 * Status: resolved