Title: Fancybox rules?
Last modified: August 22, 2016

---

# Fancybox rules?

 *  Resolved [JustExplore](https://wordpress.org/support/users/justexplore/)
 * (@justexplore)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/)
 * You´ve developed an absolutely beautiful theme, I just love the Asteria Lite!!
 * I was wondering what are the “rules” for images opening in a new browser window
   versus images opening in a fancybox? Sometimes, even in the very same post, images
   are opening in both, i.e. fancybox or new window. Ideally I want to be able to
   choose, how the images open.
    I´ve tried a couple of things and it does not seem
   to depend on jpg/png, size, thumbnail settings or media/URL link….? I´ve also
   tried to install respective plugins, but they would not work either… What do 
   I have to do to determine how images are opened? Cheers

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

 *  Thread Starter [JustExplore](https://wordpress.org/support/users/justexplore/)
 * (@justexplore)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5321914)
 * ups, sorry, so I figured out that I et the fancybox display only with png images.
   But then my next question is. How do I set this also for jpg – or ideally manually
   for every individual picture?
 *  Theme Author [Towfiq I. (Brave)](https://wordpress.org/support/users/tislam100/)
 * (@tislam100)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322022)
 * fancybox works with jpg, png, gif etc. can you post a page link where the jpg
   images are not being opened by fancybox?
 *  Thread Starter [JustExplore](https://wordpress.org/support/users/justexplore/)
 * (@justexplore)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322118)
 * Sure, here´s a link. Look at the photographs, not the symbol pictures
    [http://justexplore.org/?p=102](http://justexplore.org/?p=102)
 *  Theme Author [Towfiq I. (Brave)](https://wordpress.org/support/users/tislam100/)
 * (@tislam100)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322121)
 * hmm. thats a bug. Open up “fancybox.js” file from the “js” folder of the theme
   and replace this:
 * `jQuery(".single_post_content.gallery .hasimg[href$='.jpg'], .single_post_content.
   gallery .hasimg[href$='.png'], .single_post_content .gallery .hasimg[href$='.
   gif']").addClass('grouped_elements');`
 * with this:
 * `jQuery(".single_post_content.gallery .hasimg[href$='.jpg'], .single_post_content.
   gallery .hasimg[href$='.jpeg'], .single_post_content .gallery .hasimg[href$='.
   png'], .single_post_content .gallery .hasimg[href$='.gif']").addClass('grouped_elements');`
 *  Thread Starter [JustExplore](https://wordpress.org/support/users/justexplore/)
 * (@justexplore)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322127)
 * cool, thanks, but it still doesn´t work…?
 *  Theme Author [Towfiq I. (Brave)](https://wordpress.org/support/users/tislam100/)
 * (@tislam100)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322128)
 * are you sure you made the change? I am not seeng it..
 *  Thread Starter [JustExplore](https://wordpress.org/support/users/justexplore/)
 * (@justexplore)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322130)
 * that´s weird, I´m sure I changed it, double checked and just in case uploaded
   the revised file manually again as well…
 * But, stupid question maybe, but in the fancybox.js I am looking at it says:
    
   jQuery(“.post_content .gallery ….etc and not jQuery(“.single_post_content .gallery….
   Does that make a difference?
 *  Theme Author [Towfiq I. (Brave)](https://wordpress.org/support/users/tislam100/)
 * (@tislam100)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322131)
 * then try replacing this line:
 * `jQuery(".post_content .gallery .hasimg[href$='.jpg'], .post_content .gallery.
   hasimg[href$='.png'], .post_content .gallery .hasimg[href$='.gif']").addClass('
   grouped_elements');`
 * with this:
 * `jQuery(".post_content .gallery .hasimg[href$='.jpg'], .post_content .gallery.
   hasimg[href$='.jpeg'], .post_content .gallery .hasimg[href$='.png'], .post_content.
   gallery .hasimg[href$='.gif']").addClass('grouped_elements');`
 *  Thread Starter [JustExplore](https://wordpress.org/support/users/justexplore/)
 * (@justexplore)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322132)
 * 😉 yeah, due to the lack of the “single_post_content line” I had done this replacement
   instead but it didn´t do anything
 *  Theme Author [Towfiq I. (Brave)](https://wordpress.org/support/users/tislam100/)
 * (@tislam100)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322178)
 * after making the edit load that page and press ctrl+f5 couple of times to see
   the change.
 *  Thread Starter [JustExplore](https://wordpress.org/support/users/justexplore/)
 * (@justexplore)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322209)
 * Works now, many thanks!!!
 *  Theme Author [Towfiq I. (Brave)](https://wordpress.org/support/users/tislam100/)
 * (@tislam100)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322210)
 * Great! it would help if you could kindly rate the theme. thanks.
 *  Thread Starter [JustExplore](https://wordpress.org/support/users/justexplore/)
 * (@justexplore)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322212)
 * With pleasure!

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

The topic ‘Fancybox rules?’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/asteria-lite/1.0.3/screenshot.
   png)
 * Asteria Lite
 * [Support Threads](https://wordpress.org/support/theme/asteria-lite/)
 * [Active Topics](https://wordpress.org/support/theme/asteria-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/asteria-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/asteria-lite/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [JustExplore](https://wordpress.org/support/users/justexplore/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/fancybox-rules/#post-5322212)
 * Status: resolved