Title: Another &#8220;triggering&#8221; question
Last modified: May 14, 2020

---

# Another “triggering” question

 *  Resolved [rengland77](https://wordpress.org/support/users/rengland77/)
 * (@rengland77)
 * [6 years ago](https://wordpress.org/support/topic/another-triggering-question/)
 * I’ve looked through the forum, and your “manual activation” page… but I don’t
   know enough php to get this to work. I’m using ACF (grabbing the image URL) and
   a genesis function to add this below normal content. Trying to make the word “
   Bio” link to an image popup. What am I missing?? Would trying to link text to
   a lightbox even work? Thanks.
    (this page isn’t live yet.)
 * `<ul class=”staff-links”>
    <?php if( have_rows(‘instructor’) ): while ( have_rows(‘
   instructor’) ) : the_row(); $image = get_sub_field(‘biography_photo’); if ( function_exists(‘
   slb_activate’) ) { $image = slb_activate($image); } ?>
    -  <span class=”bio-name”><?php the_sub_field(‘name’); ?></span>
       <span class
      =”bio-links”> “>Bio | ” target=”_blank” rel=”noopener noreferrer”>Bean app
      </span>
    -  <?php endwhile;
       else : // no rows found endif; ?>

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [rengland77](https://wordpress.org/support/users/rengland77/)
 * (@rengland77)
 * [6 years ago](https://wordpress.org/support/topic/another-triggering-question/#post-12836625)
 * Yikes! sorry about that code formatting mess. Not used to trying to post code
   here!
 *  Plugin Author [Archetyped](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [6 years ago](https://wordpress.org/support/topic/another-triggering-question/#post-12836996)
 * Hi, please provide an updated code sample ([see WordPress’ documentation for instructions](https://wordpress.org/support/forum-user-guide/faq/#how-do-i-post-code-examples)),
   and I would be glad to take a look.
 * SLB works with any valid link, regardless of whether the link contains text or
   an image.
 * However, from what I can see from the above snippet, it looks like you may be
   passing `slb_activate()` an image URL only. As per [SLB’s manual activation documentation](https://github.com/archetyped/simple-lightbox/wiki/Activation#manual-activation),
   it’s important to note that `slb_activate()` is used on content “containing **
   links** to be activated”, not bare URLs.
 * You can also use the example code included on that page for reference, as it 
   demonstrates building an HTML link, and then passing the link through `slb_activate()`
   to activate it.
 *  Thread Starter [rengland77](https://wordpress.org/support/users/rengland77/)
 * (@rengland77)
 * [6 years ago](https://wordpress.org/support/topic/another-triggering-question/#post-12841214)
 * Ugh, you’re right. I was trying to activate an image url.
 * If feeling friendly, here’s my mess (snippet). Back to the drawing board!
 *     ```
       <?php 
       		if( have_rows('instructor') ):
       		while ( have_rows('instructor') ) : the_row();
       		$image = get_sub_field('biography_photo'); 
       		if ( function_exists('slb_activate') ) {
       			$image = slb_activate($image);
       		}
       		?>
   
       	 		<li>
       	 			<span class="bio-name"><?php the_sub_field('name'); ?></span>
       	 			<span class="bio-links">
       	 				<a href="<?php echo $image; ?>">Bio</a> | 
       	 				<a href="<?php the_sub_field('bean_app_link'); ?>" target="_blank" rel="noopener noreferrer">Bean app</a>
       	 			</span>
       	 		</li>
   
       	 	<?php endwhile;
       	        else :
       	            // no rows found
       	        endif; 
               ?>
       ```
   
 *  Plugin Author [Archetyped](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [6 years ago](https://wordpress.org/support/topic/another-triggering-question/#post-12849262)
 * Thanks for reposting the code snippet. It looks like the [“Display post thumbnail in lightbox” example code](https://github.com/archetyped/simple-lightbox/wiki/Activation#display-post-thumbnail-in-lightbox)
   in SLB’s documentation is a good fit for your needs.
    1. The `$thumbnail['url']` variable contains the link’s URL, which you can replace
       with your ACF-based URL.
    2.  The `$thumbnail['link']` variable is where the HTML link is built.
    3. Once the full link is built, you can `echo` it into your HTML in place of the
       existing link with PHP-inserted URL.
 * Post your updated code snippet if you’re having any problems, and I would be 
   glad to take a look.
 *  Thread Starter [rengland77](https://wordpress.org/support/users/rengland77/)
 * (@rengland77)
 * [6 years ago](https://wordpress.org/support/topic/another-triggering-question/#post-12860062)
 * Thank you for your help, I got it working. 🙂
 *  Plugin Author [Archetyped](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [6 years ago](https://wordpress.org/support/topic/another-triggering-question/#post-12878461)
 * Awesome, glad to hear it 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Another “triggering” question’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-lightbox.svg)
 * [Simple Lightbox](https://wordpress.org/plugins/simple-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-lightbox/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Archetyped](https://wordpress.org/support/users/archetyped/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/another-triggering-question/#post-12878461)
 * Status: resolved