Link to Dynamic Featured Image
-
Need some help. I’m trying to incorporate my secondary featured image within a a href link so it can display in a lightbox. Tried a whole bunch of methods using the API calls but either it doesn’t display the URL or it completely breaks up the site altogether. Here’s an example of what I’m trying to in my functions.php using the Divi theme from Elegant Themes, The idea is it displays the first featured image as a thumbnail and then links to the full image which is the second featured image and is completely different:
<a href='{$image['full']}'> <?php if ( 'on' !== $fullwidth ) : ?> <span class="et_portfolio_image"> <?php endif; ?> <?php print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height ); ?> <?php if ( 'on' !== $fullwidth ) : ?> <span class="et_overlay"></span> </span> <?php endif; ?> </a>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Link to Dynamic Featured Image’ is closed to new replies.