Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Getting Simple Lightbox Working With Featured Image

$
0
0

Replies: 0

Hey there I’m trying to get SL to work with featured images loaded into my custom theme. I’m trying to follow the documentation and also other forum posts I’ve seen on the subject but I keep getting php errors with the code I’m trying to use.

Either there’s something super simple I’m missing or I’m trying to implement the code completely wrong. Here’s what I’ve got:

		   
<div class="imgbox">	
     <?php
	$url = get_the_post_thumbnail_url('full');
	$image = the_post_thumbnail();
	$content = '<a href="' .$url. '">' .$image. '</a>'
            if ( function_exists('slb_activate') ) {
	         $content = slb_activate($content);
            }
         echo $content;
       ?>
</div>

Any help and advice would be greatly appreciated!


Viewing all articles
Browse latest Browse all 59525

Trending Articles