WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Foundation Orbit & Captions + NextGen (3 posts)

  1. lonchbox
    Member
    Posted 2 years ago #

    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

    <?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 ?>" />
    		</div>
     	<?php endforeach; ?>
    	</div>
    	<?php foreach ( $images as $image ) : ?>
    		<div class="orbit-caption" id="htmlCaption-<?php echo $image->pid ?>">
    			<?php echo $image->alttext ?>
    		</div>
     	<?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!

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. lawmaxco
    Member
    Posted 1 year ago #

    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.

  3. lonchbox
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic