Skip to content


Subversion checkout URL

You can clone with
Download ZIP
WordPress plugin that integrates FancyBox into your blog
PHP JavaScript CSS


=== FancyBox for WordPress ===
Contributors: moskis
Tags: fancybox, lightbox, jquery, gallery, image, images, photo, photos, picture, pictures
Requires at least: 3.4
Tested up to: 3.4
Stable tag: 3.0.2
License: GPL/MIT

Seamlessly integrates FancyBox into your blog: Upload, activate, and you're done. No further configuration needed. However, you can customize it from the Options Page if you like... :)

== Description ==

Seamlessly integrates FancyBox into your blog: Upload, activate, and you're done. No further configuration needed. However, you can customize it from the Options Page if you like... :)

You can easely customize almost anything you can think about fancybox: the border, margin width and color, zoom speed, animation type, close button position, overlay color and opacity and even more advanced option like several options to group images into galleries, and more...

By default, the plugin will use jQuery to apply [FancyBox]( to ANY thumbnails that link directly to an image. This includes posts, the sidebar, etc, so you can activate it and it will be applied automatically.

= Demo =

You can see the plugin working on [this blog]( although there's nothing amazing to see, just a FancyBox simple implementation, that's the point ;) You can take a look at the code if you're curious, though.

== Changelog ==

This changelog is for the WordPress plugin. For the Fancybox main changelog go to its [home page](

= 3.0.2 =
* Added support for disabling fancybox on individual hyperlinked images by adding class='nolightbox'. (Thanks to Artem Russakovskii)
* Added a link to the github project page in the info tab in the settings page.
* Fixed and cleaned the installation code, new installations of the plugin should work now without need to go to the settings page.
* Fixed false positives in filenames. (Thanks to Artem Russakovskii)
* Fixed incompatibility with wordpress installations where the wp-content directory had been renamed.
* Fixed an issue that could cause the version of the plugin to be removed from settings when deactivating the plugin.
* Improved HTTPS support by using better code to retrieve the plugin url and load files.
* Removed legacy code to suport upgrading settings from 2.x versions of the plugin. This was done to avoid possible issues with clean installations of the plugin.
* Updated some CSS rules in jQuery UI
* Some minor reformatting and cleanup of code (PHP comments, empty lines, )

= 3.0.1 =
* Updated: Localization catalog updated.
* Updated: Spanish localization.
* Fixed: Minor change in settings page that may fix options page being invisible in some cases.

= 3.0.0 =
* New: Fancybox v1.3.4 support This includes many new options, like title position.
* New: Additional FancyBox Calls option that lets the user write their own additional code to use FancyBox on specific areas of the blog, like email subscription buttons, login, etc.
* New: Revert settings button added to options page. When pressed, a confirmation dialog will appear.
* New: Improvements in options page, irrelevant settings (settings that depend on a disabled setting) will hide on real time, meaning a cleaner look in the options page.
* Updated: New cleaner code to select thumbnails on which to apply the fancbox script.
* Updated: Many parts of plugins rewriten with many improvements in code.
* Updated: Options are now serialized into a single row in the database.
* Fixed: Plugin should be SSL friendly from now on.
* Fixed: Do not call jQuery option in troubleshooting section didn't work if easing was enabled.
* Fixed: Load at footer options should work better now.
* Fixed: CSS external files now addded with wp_enqueue_style().
* Fixed: has_cap error: User level value for options page removed, using role now instead. Thanks to [vonkanehoffen](
* Removed: jQuery "noConflict" Mode option removed bacause jQuery bundled with WordPress always used noConflict.
* Removed: Base64 data ("data:image/gif;base64,AAAA") in left and right fancybox link's backgrounds: It didn't seem to be working and it is usually regarded as suspicious code, so it has been removed.

= 2.7.5 =
* Fixed: Callback arguments are no longer added as "null" when they are not set in options page.

= 2.7.4 =
* Fixed: Little error tagging 2.7.3, a file didn't upload and broke options page.
* Update: Language POT file

= 2.7.3 =
* Fixed: Settings not saving in some browsers. Thanks to [supertomate](
* Fixed: JS being added to other plugins' configuration pages. Thanks to [Brandon Dove](
* Added: Support section in options page with better information

= 2.7.2 =
* Fixed: Layout problem in options page in WordPress 2.9

= 2.7.1 =
* Fixed: Z-index issue was left out in previus release
* Fixed: Setting to close fancybox when clicking on the overlay wasn't available in the menu
* Fixed: Frame width and height options are now in the "Other" tab
* Fixed: Tabs now translated in Spanish localization

= 2.7.0 =
* New: Fancybox v1.2.6 support
* New: New Admin page with tabs for better organization of all the options
* Added: Setting to change the speed of the animation when changing gallery items
* Added: Setting to enable or disable Escape key to close Fancybox
* Added: Setting to show or hide close button
* Added: Setting to close fancybox when clicking on the overlay
* Added: Setting to enable or disable callback function on start, show and close events
* Added: Italian translation
* Added: Russian translation
* Added: "Load JS at Footer" option
* Added: New Changelog tab in  Wordpress Plugin Directory
* Fixed: Some typos in Spanish translation
* Fixed: FancyBox not showing above some elements (those with zindex higher than 90)
* Fixed: JavaScript code being included in all admin pages instead of just the plugin's options page.
* Fixed: noClonflict preventing frames to work in Fancybox
* Fixed: Custom frame width and height not being applied
* Updated: Japanese translation
* Updated: JS is now Minified instead of Packed

= 2.6.0 =
* Optimized the JavaScript code used to apply FancyBox
* Updated Custom Expression section in Options Page
* Fixed uppercase image extensions not being recognized
* CSS is now loaded before the JavaScript for better parallelization
* jquery.easing.1.3.js compressed (from 8,10kb to 3,47kb) and renamed to jquery.easing.1.3.pack.js
* Added Turkish translation (some strings missing)
* Added Japanese translation (some strings missing)
* Updated Spanish translation
* Updated to use new Plugin API in WP2.7 for better forward compatibility
* Removed /wp-content/ reference in fancybox.php for better WP2.8 support
* Optimized some code readability

= 2.5.1 =
* Fixed the plugin not working when selecting Gallery Type "By Post"
* Fixed a bug that would prevent the title in the IMG tag from being copied to the A tag in some cases
* Fixed the Custom Expression showing in the Admin panel when other gallery types are selected

= 2.5 =
* Support for localizations (Spanish and German localizations included)
* Some parts of the code completely rewritten
* Fixed fancybox files being loaded on the admin pages
* New options for close button position, custom jquery expressions, iframe content
* Options page mostly rewritten, better organized
* Medium/advanced, troubleshooting/uninstall options collapsable, hidden by default
* Better support guidelines and links on options page
* Settings link on the Manage plugins page
* Custom expression hidden when not used
* Title atribute on IMG tags is now copied to its parent A tag for better caption support
* New uninstall options and better handling of new options when installing/updating
* Cleans any old options no longer needed when plugin is activated/updated

= 2.2 =
* Updated to FancyBox 1.2.1
* Added new settings to Options Page: Easing, padding size, border color
* Tweaked CSS to prevent some themes from adding unwanted styles to fancybox (especially background colors and link outlines)
* Options Page reorganized in three sections: Appearance, Behaviour and Troubleshooting Settings, to make settings easier to find

= 2.1.1 =
* Fixed a new bug introduced in 2.1 that prevented options from being saved. Sorry about the mess :(

= 2.1 =
* Fixed a major bug in 2.0 that prevented it from working until plugin's options page was visited
* Added two options for troubleshooting that might help in some cases if the plugin doesn't work: disable jQuery noConflict and skip jQuery call
* Additional fixes to caption CSS: Captions should look better now in Hybrid theme, child themes, and other situations where general table elements are improperly styled

= 2.0 =
* Brand new Options Page in Admin Panel lets you easely customize many options: fancybox auto apply, image resize to fit, opacity fade while zooming, zoom speed, overlay on/off, overlay color, overlay opacity, close fancybox on image click, keep fancybox centered while scrolling
* CSS completely updated for FancyBox 1.2.0
* Captions fixed in IE

= 1.3 =
* Shadows and Close button should be fixed now

= 1.2 =
* Updated to FancyBox 1.2.0
* Uses packed version of the JavaScript file (8kb instead of 14kb)

= 1.1 =
* Fixed FancyBox not being applied to .jpeg files
* Fixed "Click to close" overlay text
* Moved images to /img/ folder

== Installation ==

1. Upload the `fancybox-for-wordpress` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. That's it, [FancyBox]( will be automatically applied to all your image links and galleries.
4. If you want to customize a bit the look and feel of FancyBox, go to the Options Page under General Options in the WordPress Admin panel

== Screenshots ==

1. Simple example of fancybox on a post. [Live demo here](
2. Basic settings on Options Page in the Admin Panel. This makes it very easy to customize the plugin to your needs

== Frequently Asked Questions ==

= Are you the author of FancyBox? =

NO. I just ported it to WordPress. For more info on the FancyBox script itself [visit its website](

= Help translate the plugin to your language =

If you want to make a localization you can use the sources in the laguages folder and email me the PO and MO files (or just the PO) at jose (at) I will add it in the next release and if you want me to, i'll send you updated pot file a couple of days before future releases.

= The plugin does not work =

The most common problem is another plugin or your theme conflicting with the plugin. This is usually caused by some plugin that load jQuery directly instead of using the wp_enqueue_script function. Try following all the guidelines in the options page, and if necesary try the troubleshooting settings.

If the plugin is not working or you find any bug/bad behaviour/conflict deactivate it and email me at jose (at) with a description of the problem, and i'll take a look at it.

If activating the plugin somehow brakes your panel (cant imagine that happening but just in case) delete the plugin from the plugins folder and go to your blog panel.

= Suggestions and feature requests? =

Don't hesitate to email me at jose (at) with any thoughts about this plugin, feature requests, issues, doubts suggestions, anything goes. :)

= How does the plugin exactly work? =

First the plugin checks if your blog is using jQuery, if not it will load it from the WordPress files. Then it will load the FancyBox JavaScript, which is where all the magic happens. After this all the CSS code needed to beautify the plugin is added to the page. Finally, the JavaScript waits for your blog to finish loading and then it looks for all links where FancyBox can be applied, and adds it. And that's it. :)

= The plugin does not work with Mandingo theme =

To fix this edit the file /themes/mandigo/header.php and remove the line 231:

<code>&lt;script type="text/javascript" src="&lt;?php echo $dirs['www']['js']; ?&gt;jquery.js"&gt;&lt;/script&gt;</code>

After applying this fix everything seems to work perfectly.
Something went wrong with that request. Please try again.