Lightbox doesn't seem to be functioning

Support Area Forums Epic Lightbox doesn't seem to be functioning

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
URL to the page in question:
  • Author
    Posts
  • #16864
    Matthew Brandon
    Participant

    I have the images “link to image” but there doesn’t seem to be any Lightbox effect. In fact, I don’t see a Lightbox plugin or option. Am I missing something?

    http://onfieldmedia.org/lifebridge-youth-park-trip/

    Matt

    #16867
    Bill Robbins
    Moderator

    Hello Matt,

    Thank you for your business first of all. Sorry for the trouble there with the lightbox. It’s set to make the images in photo galleries open up in the lightbox automatically. The next theme update to the theme will apply that to all links to image files. You can go on and make that change on your site if you’d like to. Here’s how:

    1. Go to the Appearance section in your WordPress control panel and select Edit.
    2. From the list of files on your right, choose custom-js.php
    3. Find this section:
      
      // Load Lightbox and add lightbox class and rel for prev/next functionality
      	jQuery(document).ready(function(){
          	jQuery('.lightbox').lightbox();
          	
          		jQuery('.gallery a').addClass('lightbox');
          		jQuery('.gallery a').attr('rel', 'gallery');
          
          });
      
    4. Replace that with this:
      
      // Load Lightbox and add lightbox class and rel for prev/next functionality
      		jQuery(document).ready(function(){
      	    	jQuery('.lightbox').lightbox();
      	    		
      	    		jQuery('div.gallery a').attr('rel', 'gallery');
      	    		jQuery('div.images a').attr('rel', 'gallery');
      	    
      	    });
      	
      	// Add lightbox class to single images with links:
      		jQuery('a').each(function(){
      			
      			if ( this.href.toLowerCase().substr(-4).indexOf('.jpg') < 0 &&
      			     this.href.toLowerCase().substr(-5).indexOf('.jpeg') < 0 &&
      			     this.href.toLowerCase().substr(-4).indexOf('.png') < 0 &&
      			     this.href.toLowerCase().substr(-4).indexOf('.gif') < 0 )
      			return;
      	
      			var $lnk = jQuery(this); 
      			
      			$lnk.addClass('lightbox');
      		
      		});
      
    5. Save your changes.

    See if that works for you. The next update to the theme, version 2.0.6, will include that.

    If you have any trouble, let me know.

    Thanks,
    Bill

    #16912
    Matthew Brandon
    Participant

    Fantastic! It worked like a charm. One other minor question. Does your enabled to lightbox run though the photos in the post without close it for each photo? Sort of a manual slide show. No biggie, just wondering.

    #16916
    Bill Robbins
    Moderator

    Glad to hear that worked for you. It does add the previous/next buttons when the photos are in the same thumbnail gallery, but not individual images in a post.

    If you don’t mind tinkering a bit in the text editor, you can add those manually. Just edit a page/post and click on the text tab at the top right hand corner of the content box. Then find your links to your images and just after the opening <a you could add this:

    
    rel="gallery"
    

    to all of them. I believe that will add prev/next links to all of them.

    Let me know if you have trouble if you give that a try.

    Thanks,
    Bill

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Lightbox doesn't seem to be functioning’ is closed to new replies.