Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: imagesGallery
- */
- ?>
- <?php get_header(); ?>
- <div class="container">
- <div class="row">
- <?php if( have_posts() ): ?>
- <?php while ( have_posts() ) : the_post();
- if( function_exists('dfi_get_featured_images') ) {
- $featuredImages = dfi_get_featured_images();
- //Loop through the image to display your image
- if( !is_null($featuredImages) ){
- $links = array();
- foreach($featuredImages as $images){
- $thumb = $images['thumb'];
- $fullImage = $images['full'];
- $links[] = "<a href='{$fullImage}' class='dfiImageLink'><img src='{$thumb}' /></a>";
- }
- echo "<div class='dfiImages'>";
- foreach($links as $link){
- echo $link;
- }
- echo "</div>";
- }
- }
- ?>
- <?php the_content(); ?>
- <?php endwhile; ?>
- <?php endif; ?>
- <?php wp_reset_postdata(); wp_reset_query(); ?>
- <?php $ccfit_loop = new WP_Query( array( 'post_type' => 'photo', 'posts_per_page' => 9999 ) ); ?>
- <?php if ( $ccfit_loop->have_posts() ) : ?>
- <?php while ( $ccfit_loop->have_posts() ) : $ccfit_loop->the_post(); ?>
- <?php
- $ccfit_img_thumb = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_id() ), 'ccfit_thumb', false );
- $ccfit_img_big = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_id() ), 'ccfit_big', false );
- echo '
- <div class="col-md-4">
- <div class="inner">
- <a href="'. $ccfit_img_big[0] .'"></a>
- <img src="'. $ccfit_img_thumb[0] .'">
- <h2>'. get_the_title() .'</h2>
- <p>'. get_the_content() .'</p>
- <hr>
- <?php
- if (isset($featuredImages) && is_array($featuredImages)) {
- foreach($featuredImages as $images) {
- $thumb = $images['thumb'], <------------------- line 64
- $fullImage = $images['full'],
- print ' <a class="fancybox" href="'. $fullImage .'" style="text-align:center">« Take a look »</a> ';
- }
- }
- ?>
- </div></div>'; ?>
- <?php endwhile; ?>
- <?php endif; ?>
- </div>
- <div class="row">
- <hr style="margin-top:-5px;">
- <h2 class="centered" style="padding-top:65px;">Contact me</h2>
- <p class="centered" style="margin-bottom:80px;"><a href="/start-yout-project" class="btn btn-danger">Start your project</a></p>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment