Noor's Plugin

WordPress Plugins, Themes, Hosting, Tutorials & more!

  • Home
  • Plugins
    • Themes
  • Hosting
  • Contact
    • Privacy Policy
  • About

WordPress fancyBox Plugin

WordPress fancyBox plugin enables fancy lightbox functionality on your WordPress site. It allows you to pop up an image, YouTube video, Vimeo video, or inline HTML content beautifully.

fancyBox is a jQuery lightbox script developed for opening content in a Mac-style lightbox. This plugin makes fancyBox lightbox script available for WordPress.

WordPress fancyBox Plugin Installation

  • Login to your WordPress admin dashboard
  • Go to Plugins->Add New
  • Enter WP fancyBox in the search box
  • Once you find the plugin hit the install button

Option 2

  • Download the zip version of the plugin
  • Go to Plugins->Add New and switch to the Upload tab
  • Select the zip file on your computer
  • Upload and install it

Option 3

  • Download the zip file and extract it
  • Connect to your website via FTP (you can use a software like Filezilla to transfer files to your server) and browse to the “/wp-content/plugins” folder
  • Select the folder containing the plugin files on your computer and upload it
  • Once all the files have been uploaded to your web server you can activate the plugin from the Plugins menu (WordPress admin dashboard)

How to Use WordPress fancyBox Plugin

You can pop up your media file from either a text or image link (it’s called hyperlink in the shortcode) by using a shortcode.

Photo/Image in Lightbox

[wp_fancybox_media url="https://example.com/wp-content/uploads/image/lightbox.jpg" hyperlink="click here to open image"]

Here is a screenshot of the popup window from a mobile device:

screenshot of photo/image in lightbox using the WordPress fancyBox plugin

YouTube Video in Lightbox

[wp_fancybox_media url="https://www.youtube.com/watch?v=Vpg9yizPP_g" hyperlink="click here to open youtube video"]

Here is a screenshot of the YouTube video popup from a mobile device:

screenshot of YouTube video in lightbox using the WordPress fancyBox plugin

Vimeo Video in Lightbox

[wp_fancybox_media url="https://vimeo.com/1084537" hyperlink="click here to open vimeo video"]

Here is a screenshot of the Vimeo video popup from a mobile device:

screenshot of vimeo video in lightbox using the WordPress fancyBox plugin

Inline HTML in Lightbox

[wp_fancybox_media url="#inline_content" hyperlink="click here to open inline HTML"]

After entering the shortcode switch to the “Text” editor, create a div (The ID needs to match one specified in the url parameter) and enter your custom HTML content that you want to pop up in lightbox. For example:

screenshot of inline html popup code using the WordPress fancyBox plugin

Save the page and view it in a new tab. When you click on the text link your inline HTML content will pop up in lightbox.

screenshot of inline HTML in lightbox using the WordPress fancyBox plugin

Using Thumbnail as Hyperlink

In order to open lightbox from a thumbnail image you need to specify your thumbnail image URL in the hyperlink parameter. For example:

[wp_fancybox_media url="https://example.com/wp-content/uploads/image/lightbox.jpg" hyperlink="https://example.com/wp-content/uploads/image/thumbnail.jpg"]

Alternate Text for an Image

If you have a thumbnail image as the hyperlink, you might also want to specify an alternate text for it. This can be done using the “alt” parameter in the shortcode (This is very useful for SEO). For example:

[wp_fancybox_media url="https://example.com/wp-content/uploads/image/lightbox.jpg" hyperlink="https://example.com/wp-content/uploads/image/thumbnail.jpg" alt="thumbnail image description"]

Showing Caption in Lightbox

In order to show a caption for your media file you need to use the caption parameter in the shortcode. For example:

[wp_fancybox_media url="https://example.com/wp-content/uploads/image/lightbox.jpg" caption="overlay image" hyperlink="click here to open image"]

Related

Written by Noor Alam · Categorized: Plugin, wordpress

Comments

  1. Robert says

    Really love this plugin! Clean, responsive and lightweight. Much better than Easy fancybox. Keep up the good work.

    Reply
  2. Michael says

    Works perfectly; an absolute relief to find a simple, lightweight lightbox—many of the others either are not responsive or are densely counter-intuitive. Thanks so much for this.

    One small note: You misspelled “width” on the YouTube embed code.

    Reply
    • admin says

      @Michael, Thank you for the feedback :). I have fixed the typo in the YouTube embed code.

      Reply
  3. Jesus Cordero says

    Hi, is there any options to get the youtube video on the lightbox in fullscreen mode?

    Reply
    • admin says

      @Jesus, Do you mean you want to show a fullscreen option in the YouTube player or automatically open the YouTube player in fullscreen mood when it opens in lightbox.

      Reply
      • QNS says

        Hi there,

        Great plugin, great work.

        I would love to know how to show the fullscreen option in the Vimeo player when it opens in lightbox, or to resize for different screens (desktop, tablet and mobile).

        Reply
        • admin says

          @QNS, The popup window is already compatible with desktop, tablet, and mobile devices.

          Reply
  4. Carole Alalouf says

    Hi, do you know if I can use this inside Revolution Slider to display a Youtube video in a lightbox by clicking on a button in the slider?
    Thank you very much
    Carole

    Reply
  5. Gen says

    Great plugin. A few questions.

    1. How do you add a rollover to a thumbnail?

    2. I added some JS embed code as html content and the box was cut off. Not sure what kind of html content is supported.

    Reply
    • admin says

      @Gen, It’s not possible to add a rollover effect to a thumbnail at the moment. You will need to customize the plugin code in order to implement this functionality.

      Reply
      • Emma says

        Hello, can you explain how to customize your code so that a hover image overlay is possible for thumbnails? Thanks!

        Reply
        • Noor Alam says

          @Emma, This is not possible at the moment.

          Reply
  6. Cosmin Kiss says

    Hy team.
    I love you plugin. it’s so great!

    I have a problem. When i add an external page in lightbox i want to scroll down and up to view the entire page. Can you help me with this problem? Can you tell me what shortcode to use?

    Reply
    • admin says

      @Cosmin, Please provide a link to the page in question so I can take a look.

      Reply
  7. Steve says

    Hi there. Great plugin! Is there a way to create a normal link on a page without the shortcode?

    Reply
    • admin says

      @Steve, That depends on what you are trying to open in lightbox.

      Reply
  8. Jessica Burnett says

    Is there a configuration to set that would make the lightbox iframe to be initialized when the page loads without having to click a hyperlink?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search Noor’s Plugin

Recent Posts

  • How to Add a Quantity Field to a Stripe Payment Button
  • How to Add a Price Field to a PayPal Button
  • Hide Product Image for WooCommerce Plugin
  • How to Show a Download Button to Logged in Users Only
  • How to Add a Price Field to a Stripe Payment Button
  • How to Disable/Hide Featured Images in WordPress Astra Theme
  • What is the White Screen of Death in WordPress?
  • How to Fix YouTube Error The uploader has not made this video available in your country
  • How to Configure SendGrid SMTP in WordPress
  • Checkout for PayPal WordPress Plugin

Copyright © 2022 · Noor's Plugin

This website uses cookies to improve your experience. By continuing, you agree to their use.Got it! Learn More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT