• Hi! I have WP 3.7.1. I’ve installed the plug-in. But it doesn’t work… I’ve tried installing via the Plugins > Add New back-end page. Didn’t work. I un-installed, deleted the files, and tried again via uploading the unzipped folder to the /plugins/ folder with my FTP client. Still doesn’t work. My images are set up to “link to image.” But, when I click an image, nothing happens. Before I installed the plug-in, clicking an image would go to the .jpg file (link to image). Now, on mouse-over, the image URL appears in the bottom bar – but when you click, nothing happens. I’ve gone to the post editor, and set img class=”fancybox”, still nothing happens. I’ve also tried setting the a href”…” class=”fancybox”, still nothing happens. Any ideas of what I could do to fix this? Thanks so much!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Julia, it sounds like a conflict with either another jQuery version or CSS style (positioning) rules… Can you share a link to your site? I need to take a look to debug this.

    Thread Starter juliakostreva

    (@juliakostreva)

    very possible! Thank you! http://blog.juliakostreva.com

    Thread Starter juliakostreva

    (@juliakostreva)

    Ok, I think it’s because I’m using the Pin-it button.

    I did a few things, and now it works. I’m not sure which one helped. This could be a hack messy solution, but, hey. It works now. (If you are going to do this or something like this for your site, please make sure your URLS use the correct URLS and file names for your theme name/folder names, all that stuff.

    – I made sure all of my images had class=”fancybox” eg.
    <a href="" class="fancybox">

    – I downloaded the original fancybox (here), and I uploaded these files: “jquery.fancybox.css” uploaded to wp-content/themes/twentytwelve/css
    “jquery.fancybox.js” uploaded to wp-content/themes/twentytwelve/js
    “jquery.fancybox.pack.js” uploaded to wp-content/themes/twentytwelve/js

    – Then, I edited my theme’s header.php file, inside the <head> tag… I made sure I had the correct URLs for linking the fancybox css and javascript.

    <script src="http://blog.juliakostreva.com/wp-content/themes/twentytwelve/js/fancybox/jquery.fancybox.js" type="text/javascript"></script>
    <script src="http://blog.juliakostreva.com/wp-content/themes/twentytwelve/js/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>
    <link rel="stylesheet"  href="http://blog.juliakostreva.com/wp-content/themes/twentytwelve/css/jquery.fancybox.css" />

    – I saw this article, and “In your header.php template file, add the following PHP code in your <head>:
    <?php wp_enqueue_script('jquery.fancybox.js', '/wp-content/themes/twentytwelve/js/fancybox/jquery.fancybox.js'); ?>

    – I skipped #3 in that tutorial, because I didn’t know what it was.

    – I did #4 in that tutorial:
    “Lastly, for this to work, the uploaded image must link to a larger version of itself. As of WordPress 3.4, it seems that uploaded images automatically link to a page with the media embedded. To change this, go to http://www.yoursite.com/wp-admin/options.php and find the field labeled “image_default_link_type”. This field may be empty or contain “post”, but you want to change it to “file”. Scroll to the bottom and save.”

    – Then finally, I also followed the instructions of this article, and I went to my footer.php document, and right before the closing body tags I typed

    <script>
    $('.fancybox').fancybox({
    //set the next and previous effects so that they make sense
    //the elastic method is confusing to the user
    nextEffect: 'fade',
    prevEffect: 'fade',
    
    //set the position of the title
    helpers : {
    title: {
    // title position options:
    // 'float', 'inside', 'outside' or 'over'
    type: 'inside'
    }
    },
    
    beforeShow: function () {
    //if you don't already have titles
    //you can just make the title the pinterest button
    //add pinterest button for title
    this.title = '<a class="pin-it-button" href="http://pinterest.com/pin/create/button/?url='+
    encodeURIComponent(document.location.href)+
    '&media='+
    //set your image path here
    encodeURIComponent('http://absoluteimagepath.com/path/to/image/'+this.href)+
    '&description=Pin from ScottGale.com">'+
    '<img title="Pin It" src="http://assets.pinterest.com/images/PinExt.png" alt="" border="0" /></a>';
    }
    });
    </script>

    So. Now the fancybox works when I click it.
    And, my pin-it button works, too.

    It does not, however, have that nice little “Pin it” button inside the fancybox (from Scott Gale’s tutorial). I’m still figuring out how to implement that.

    lol That was a long way to get there.

    Hi Julia, effectively you are now (I suppose, looking at the steps you took) running two versions of FancyBox next to each other. You integrated the fancyBox2 script into your theme which is completely different from the FancyBox 1.3.4 script in my plugin. Running the two together is asking for conflicts and doubles page load times.

    And since you came this far I would advise to disable my plugin and continue / complete the fancyBox2 integration into your theme 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Installed, but doesn't work’ is closed to new replies.