[Plugin: WP Lightbox 2] Add rel="lightbox" to featured image
-
Hi everyone,
I need an option how to enlarge the featured image on full screen and thought about lightbox as a solution. But I don’t find a proper way to include rel=”lightbox” in the featured image on single posts. Btw: I use GK Portfolio.
The problem is, that the lightbox may only appear on the single post itself but not on the category view already – that have to link to the single post as usual. Do you have any ideas? I think it has to be done somewhere here in the content-header-simple.php, but not sure…
<?php if(!is_singular() || (is_singular() && get_theme_mod('portfolio_post_show_featured_image', '1') == '1')) : ?> <header class="entry-header no-anim<?php if(is_singular() && is_sticky()) :?> sticky<?php endif; ?><?php if(get_theme_mod('portfolio_full_width_images', '1') == '1') : ?> full-width-image<?php endif; ?><?php if(get_theme_mod('portfolio_post_show_title', '1') == '0') : ?> no-title<?php endif; ?>" data-url="<?php echo get_permalink(); ?>"> <?php if (has_post_thumbnail() && ! post_password_required()) : ?> <?php the_post_thumbnail(is_singular() ? 'full' : 'gk-portfolio-size'); ?> <?php elseif($video_code) : ?> <div class="video-wrapper"> <?php echo $video_code; ?> </div> <?php endif; ?> </header><!-- .entry-header -->Thanks a lot. Ah, the website is http://www.heidi-hielscher.de/new
Dario
The topic ‘[Plugin: WP Lightbox 2] Add rel="lightbox" to featured image’ is closed to new replies.