• Resolved angeladesign

    (@angeladesign)


    How and what do I change to get the images to open in a lightbox and not the image’s url page?
    Thanks!

    <div class="row">
    
                        	<!-- START PORTFOLIO LOOP -->
                        	<?php $loop = new WP_Query( array( 'post_type' => 'our_work', 'orderby' => 'date', 'order' => 'DESC','posts_per_page'=>12 ) ); ?>
    
                             <?php while( $loop->have_posts() ) : $loop->the_post(); ?>
    
                            <div class="col-sm-6 col-md-6 col-lg-4">
                                <div class="portfolio-item img-responsive">
    
               						<a href="<?php
    $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
    echo $feat_image;
    ?>" rel="lightbox" target="_blank">
                                 <?php if ( has_post_thumbnail() ) {
    									the_post_thumbnail( 'full', array('class' => 'img-responsive') );
    									}
    								?> </a>
    
                                </div>
                            </div> <!-- end col -->
    
    						<?php endwhile; ?> <!-- END PORTFOLIO LOOP -->
    
                            </div>
                            <!-- /.row (nested) -->
    
                        </div>
                    </div>
                    <!-- /.col-lg-10 -->
                </div>
                <!-- /.row -->
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Featured Image open rel="lightbox"’ is closed to new replies.