WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] not working with my theme (6 posts)

  1. tjobbe
    Member
    Posted 1 year ago #

    I've installed easy fancybox and got it working - but only with the default 2012 theme, and not with my custom theme.

    I can see in the html that the fancybox scripts are loading in, but when clicking the images they simply show the jpg's instead of the in a fancybox modal.

    What on earth is happening? The site isn't live, but if you go to http://cbDOTtawd.co.uk/celebration-cakes/ you'll see a page in question (replace the DOT in the url with a period character, as it's a sub domain of http://www.tawd.co.uk - hope this makes sense - don't want it spidered yet.)

    Thanks in advance!

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. skeeterz71
    Member
    Posted 1 year ago #

    It must be a custom theme thing. It's not working and I'm using a custom child theme I made, instead of a new theme altogether. Easy fancybox won't work.

  3. skeeterz71
    Member
    Posted 1 year ago #

    This is just an update. As mentioned above, I use child themes in WP 3.5 in combination with the twenty twelve theme. I couldn't figure out why easy fancybox or other lightboxes would not work. So I got to tinkering with the images in my posts.

    I edited the image link to "link to image" This is the same setting as set to "media file" vrs (attachment page) when uploading an image.

    So to sum it up, if your images are set to the attachment page in the upload section, the lightboxs won't work. Set link to image so it calls from wp-content instead of your catagory/post page (whatever it's called can't remember) If it is NOT set to media (wp-content) then you only target another window when the image is clicked on. If the image link is set to the image/media file, the lightbox will display it. You can see how it works even with child themes and using tewnty twelve here:
    http://www.skeeterz71.com

  4. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, fix your custom script /wp-content/themes/xxxx/js/site.js as it causes an Uncaught TypeError in jQuery, breaking all other jQuery extensions. It looks like it has some invalid characters there at the end:

    Â Â $('.flexslider').flexslider({
    Â Â Â Â animation: "slide"
    Â Â });

    You tried to put in tabs maybe? Make sure you use a text editor that does only plaintext. Or use the WP theme editor and just leave out tabs as they only serve an optical (human readability) purpose... Make that part look like this:

    $('.flexslider').flexslider({
    animation: "slide"
    });
  5. tjobbe
    Member
    Posted 1 year ago #

    Hi Ravan, thanks so much for taking the time to help me out - I've implemented those changes but it still isn't working I'm afraid.

    I've even changed the media settings to look for the links in the correct div name.

  6. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    The error remains. Apparently, there is no flexslider extension (did you forget to include that file?) so just remove those lines.

    NOTE: do not take out that last }); because that is part of the wrapping that starts with jQuery(document).ready(function($) { at the beginning of the file.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic