Home Forums Add-ons Gallery Field Simple Lightbox doesn’t work on my website


Simple Lightbox doesn’t work on my website

  • Hello,

    I followed all the steps described in this post, I already disabled all plugins (except Simple Lightbox and ACF) but I can’t make it work.

    My gallery shows the images with the link to the WP file, which opens on click, not as a lightbox.

    If anyone can help, I greatly appreciate it. My code:

    function mostra_imagens() {
    	$fotos = get_field('galeria'); 
        if( $fotos ): ?>
    		<h3>Galeria de imagens</h3>
    		<div class="gallery">
    	   	foreach( $fotos as $foto ):
    			$content = '<div>';
    			$content .= '<a class="gallery_image" href="'. $foto['url'] .'">';
    			$content .= '<img src="'. $foto['sizes']['thumbnail'] .'" alt="'. $foto['alt'] .'" />';
    			$content .= '</a>';
    			$content .= '</div>';	
    			if ( function_exists('slb_activate') ) {
    				$content = slb_activate($content);
    			echo $content; 	
    	   	endforeach; ?>
    	    </div> <?php
    	$output = ob_get_clean();
    	return $output;	

    In the inspector, I can see that the slb_activate() function has been executed:

    Object inspector

    Can anyone see what is wrong??

    Thanks in advance!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.