Lightbox Error- Giving me page when I want image only.
-
On the homepage of my site I created a Featured News div that displays the most three recent featured images of a post in a certain category. When I click the image, a lightbox effect pulls up the entire page as you would see it if you were to go to the url. What I want is to see just the featured image in full size- these are for concert posters, so there is no need to see anything other than the image. I’m using a lightbox effect on other images throughout the site, but I’m using a plug-in for those, and looking at the plug-in’s code has given me no luck.
You can see it at https://www.omegadeltapsi.com
And here’s the code I’m using:
<div id="eventsholder"> <div id="events"> <?php $my_query = new WP_Query('cat=8&showposts=3'); ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> <a href="<?php the_permalink() ?>" rel="lightbox" title="<?php the_title(); ?>"> <?php the_post_thumbnail( 'featured' ); ?></a> <?php endwhile; ?> </div></div>
I believe the problem lies in the
<a href="<?php the_permalink() ?>"
, but I’m not sure what code should go in it’s stead. I’ve tried the_content, the_post_url, etc. Any suggestions?
- The topic ‘Lightbox Error- Giving me page when I want image only.’ is closed to new replies.