• Resolved JulianRichards

    (@julianrichards)


    This has been a problem for the past five years at least, as I can see at https://wordpress.org/support/topic/image-browser-jumps-to-top-of-page?replies=2 and https://wordpress.org/support/topic/page-reload-in-image-browser?replies=3.

    I’m not sure if the first solution is still applicable to the current version of NextGEN Gallery. If it is, I’d be grateful if someone could suggest whether the custom code:

    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($image)) : ?>
    
    <div class="ngg-imagebrowser" id="<?php echo $image->anchor ?>">
    	<span id="picgallery"/>
    	<div class="ngg-imagebrowser-nav">
    		<div class="back">
    			<a class="ngg-browser-prev" id="ngg-prev-<?php echo $image->previous_pid ?>" href="<?php echo $image->previous_image_link ?><?php echo $pid?>#picgallery">◄ <?php _e('Back', 'nggallery') ?></a>
    		</div>
    		<div class="next">
    			<a class="ngg-browser-next" id="ngg-next-<?php echo $image->next_pid ?>" href="<?php echo $image->next_image_link ?>#picgallery"><?php _e('Next', 'nggallery') ?> ►</a>
    		</div>
    		<div class="counter"><?php _e('Picture', 'nggallery') ?> <?php echo $image->number ?> <?php _e('of', 'nggallery')?> <?php echo $image->total ?></div>
    		<div class="ngg-imagebrowser-desc"><p><?php echo $image->description ?></p></div>
    	</div>
    <p><?php echo $image->alttext ?></p>
    	<div class="pic"><?php echo $image->href_link ?></div>
    
    </div>	
    
    <?php endif; ?>

    should replace some bit of the existing code, or if instead it needs to be inserted somewhere.

    I’ve turned on AJAX pagination as suggested in the second solution, but to no avail.

    Example gallery: http://julian-richards.co.uk/gloucester-green-oxford-30-september-1989/nggallery/image/gloucester-green-30-september-1989-12/

  • The topic ‘[Plugin: NextGEN Gallery] Basic ImageBrowser jumps to top of page on reload’ is closed to new replies.