Support » Plugin: NextGEN Gallery - WordPress Gallery Plugin » [Plugin: NextGEN Gallery] Foundation Orbit & Captions NextGen

  • I think this could be usefull for someone who is using the Foundation Framework Orbit Slider.

    Just create the folder nggallery inside of your folder theme and use this code to with a new gallery template, I call it gallery-slider.php

    Template for Orbit slider Gallery + Captions
    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
    	<div id="featured">
    	<?php foreach ( $images as $image ) : ?>
    		<div data-caption="#htmlCaption-<?php echo $image->pid ?>">
    			<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->imageURL ?>" />
     	<?php endforeach; ?>
    	<?php foreach ( $images as $image ) : ?>
    		<div class="orbit-caption" id="htmlCaption-<?php echo $image->pid ?>">
    			<?php echo $image->alttext ?>
     	<?php endforeach; ?>
    <?php endif; ?>

    And just use the shortcode to place it in the theme:
    <?php echo do_shortcode('[nggallery id=THEID template=slider]');?>

    Just remember to write the correct ID number of the gallery you want to use 🙂

    Have fun!

Viewing 2 replies - 1 through 2 (of 2 total)
  • lawmaxco


    Hi Pancho,

    I just came across your post.
    Its such a good idea – I’m currently trying to implement this into a site that I’m developing, but for some reason it looks as though the template isn’t being registered because the images are only displaying as thumbnails?

    My steps;
    1: Add the NextGen Plugin
    2: Created a gallery (ID = 1)
    3: Made a gallery-slider.php file and added the above code.
    4: Added the shortcode to my header file (that’s where I’m trying to implement the orbit slider)
    5: I have tried the <?php echo do_shortcode('[nggallery id=1 template=slider]');?> & <?php echo do_shortcode('[nggallery id=1 template=gallery-slider]');?>

    Is their something that I may be missing?

    Thanks in advance.

    Hi @lawmaxco,

    Great this is useful 🙂

    Did you create the nggallery folder inside your theme folder? this is very important becasue NextGen Gallery need that folder to work with templates and your file gallery-slider.php must be inside that folder.

    Hope it help 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: NextGEN Gallery] Foundation Orbit & Captions NextGen’ is closed to new replies.