Home Forums Add-ons Gallery Field Carousel / slider implementation Reply To: Carousel / slider implementation

  • I’ve tried that but had no luck the filed should just be gallery I believe,
    this is the other gallery that shows up on the page

                                <?php if(get_field('gallery')):?>
                                    <?php foreach (get_field('gallery') as $gal ):?>
                                        <a class="fancybox" rel="gallery1" href="<?php echo $gal['url']?>" title="<?php echo $gal['caption'] ?>"><img src="<?php echo $gal['sizes']['thumbnail']?>" alt="" /></a>
                                    <?php endforeach ?>
                                <?php endif; ?>   
                                <?php if( $the_galquery->have_posts() ): ?>
                                  <?php while ( $the_galquery->have_posts() ) : $the_galquery->the_post(); ?>
                                  <a class="fancybox" rel="gallery1" href="<?php echo wp_get_attachment_url( get_the_ID()); ?>" ><?php echo wp_get_attachment_image( get_the_ID(), 'thumbnail'); ?></a>
                                  <?php endwhile; ?>
                                <?php endif; ?>
                                <?php if ( !(get_field('gallery')) && !($the_galquery->have_posts() ) ):?>
                                <p>No Gallery added</p>
                              <?php endif ?>
                                 <?php if ( is_user_logged_in() ): ?> 
                                    <form  style='clear:both' id="file-form" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="POST">
                                      <p>Add image to gallery</p>
                                      <p id="async-upload-wrap"><label for="async-upload">upload</label>
                                      <input type="file" id="async-upload" name="async-upload"> <input type="submit" value="Upload" name="html-upload"></p>
                                      <p><input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id ?>" />
                                      <?php wp_nonce_field('client-file-upload'); ?>
                                      <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" /></p>
                                      <p><input type="submit" value="Save all changes" name="save" style="display: none;"></p>
                                    <form  style='clear:both' id="embed-form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="POST">
                                      <p>Add video to gallery</p>
                                      <label for="embed">You tube / vim url:</label>
                                      <textarea name="embed"></textarea>
                                      <input name='submit_video' type="submit" value="submit">
                                        <input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id ?>" />
                                      <?php wp_nonce_field('embed-form'); ?>
                                      <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" /></p>
                                  <?php endif?>