Popup with fancybox

Popup with fancybox plugin allows you to create lightweight JQuery fancy box popup window in your blog with custom content. In the admin interface we can easily configure popup size and timeout (i.e. show popup window based on timeout after page load). In this popup we can display any content such as Video, Image, Advertisement and much more.

In the admin we have standard wordpress HTML editor to create the popup message. So that we can customize the messages easily. also we have option to set expiration time for popup window. and we have option to display popup once per session, so that the popup never appear again if user navigate to another page.

Live demo

Live popup window will open 10 second after page load. Please refresh the page to view the demo again. It support all latest browser IE, Firefox, Chrome.

Advantage of this plugin

  • Lightweight JQuery.
  • Fancybox css in popup windows.
  • Show popup window based on timeout after page load.
  • HTML editor to create the popup message.
  • Option to set expiration time for message.
  • Option to set popup display once per session.

Installation Instruction

Option 1

  • Download the plugin popup-with-fancybox.zip from download location.
  • Unpack the *.zip file and extract the /popup-with-fancybox/ folder.
  • Drop the ‘popup-with-fancybox’ folder into your ‘wp-content/plugins’ folder.
  • In word press administration panels, click on plug-in from the menu.
  • You should see your plug-in listed under Inactive plug-in tab.
  • To turn the word presses plug-in on, click activate.

Option 2

  • Go to Add New menu under Plugins tab in your word-press admin.
  • Search ‘Popup with fancybox’ plugin using search option.
  • Find the plugin and click ‘Install Now’ link.
  • Finally click activate plug-in link to activate the plug-in.

Option 3

  • Download the plugin popup-with-fancybox.zip from download location.
  • Go to Add New menu under Plugins tab in your word-press admin.
  • Select upload link (top link menu).
  • Upload the available popup-with-fancybox.zip file and click install now
  • Finally click activate plug-in link to activate the plug-in.

Plugin configuration

Display popup in specific page/post

This plugin have short code option to display the popup in specific page. Just copy and paste the plugin short code into specific posts or pages to display the popup. We can use group name or message id to display the popup.

Short code

[popupwfancybox group="GROUP1"]

[popupwfancybox id="1"]

Display popup in entire website

We have two options to display the popup box in entire website.

1. Go to widget page and drag and drop the widget Popup with fancybox into your sidebar, so that popup will display in entire website.

2. Copy and paste the given PHP code into your footer.php file, so that popup will display in the entire website.

a. Download footer.php file from your theme folder.
b. Paste the below PHP code, and upload back to server.

<?php popupwfb( $Popupwfb_group = "", $Popupwfb_id = "" ); ?>

Display popup only in the home page

a. Download footer.php file from your theme folder.
b. Paste the below PHP code, and upload back to server.

<?php if (is_home()) { popupwfb( $Popupwfb_group = "", $Popupwfb_id = "" ); } ?>

Frequently asked questions

Q1. How to display popup message box once per session?

Go to Dashboard ==> Settings ==> Popup with fancybox ==> Popup Setting (Button)

In the above page we have option to configure session display. Select YES to show popup message once per session, Meaning, popup never appear again if user navigate to another page.

Q2. What is Group and Id in the plugin short code?

Go to Dashboard ==> Settings ==> Popup with fancybox

In the above page, we can view all the existing popup messages, Message ID available in the first column of the grid, and 5th column we can see the group name of the popup message.

Q3. How to modify popup window style?

CSS file name

Class name

.fancybox-content-inside {


We can easily update the popup window style in the above mentioned css class name.

Q4. How to setup expiration date for the popup message?

Expiration date option available from version 1.1. In the admin you have a separate text box to enter expiration date.

Download location


Plugin official webpage


Video tutorial


68 Responses to“Popup with fancybox”

  1. Gopi Ramasamy
    August 9, 2013 at 3:03 am #

    Plugin Short code

    [popupwfancybox group=”GROUP1″]

    [popupwfancybox id=”1″]

  2. Gopi Ramasamy
    October 6, 2013 at 2:04 am #

    Use below HTML code to add YouTube video into the popup content.

    <iframe class="youtube-player" type="text/html" src="http://www.youtube.com/embed/hc7RymU_NJE " frameborder="0" height="400" width="630"></iframe>

  3. Dan H
    April 17, 2014 at 12:49 am #

    I can’t seem to get any jQuery or Javascript running inside the Fancybox…for example, I need to be able to hide a DIV inside the fancybox that only shows when someone clicks on a link I have in the fancybox…I’ve tried many variations and no luck.

    Is this a limitation or should this be possible?


    • Gopi Ramasamy
      April 19, 2014 at 1:51 am #

      Hi Dan,

      Please send me your webpage link, so that i can check for you.

  4. Min CHEN
    April 19, 2014 at 3:08 pm #

    Hi, I would like to make the popup occur only once per session (i.e. no more popup after refreshing the page) but the check button provided does not seem to do the job.

    As I am new to web design (school project actually) I tried to use javascript cookie check to get it done, but I don’t know how to code in order to invoke the popup in javascript, could you help me? Thank you!

    • Gopi Ramasamy
      April 19, 2014 at 4:00 pm #

      Hi, This option already available in the plugin. Please read the FAQ section in the above post.

      • Min CHEN
        April 19, 2014 at 7:56 pm #

        I know, and as I said I checked this option as “YES” but it doesn’t work (in chrome and in IE)

        • Gopi Ramasamy
          April 20, 2014 at 1:47 am #

          Is it working in Firefox and IE? Session is not a browser dependent.

          • Min CHEN
            April 20, 2014 at 7:54 am #

            I made it very clear that the Session Option has no effect at all. Whether a YES or NO the popup will come out every time I refresh the page (or come back after navigating away) Chrome. IE, Firebox don’t matter it just won’t work.

            So I try to code it myself and now I need to know how to invoke this specific popup in javascript code instead of the code segment [popupwfancybox group = “GROUP1″] in HTML

  5. Zain
    April 20, 2014 at 11:45 pm #


    Thank you for the plugin. It works as advertised. Although I am trying to run a shortcode in the pop up. I would use the anything pop up but i need the on page load functionality. Can you please help ?

    • Gopi Ramasamy
      April 21, 2014 at 1:16 am #

      Hi Zain, This plugin is developed to display HTML content, you cannot use other plugins short code in this. i will try to create separate plugin for this option. Thanks

  6. Flo
    April 29, 2014 at 12:12 pm #

    Hi Gopi !

    Thanks for your the use of your nice plugin ! The option for “one per session” is very useful.

    I would like to add a html link code inside the fancy box (ie in the popup message content) to close the box. I mean, i want the user able to close the box, both by clicking on the cross, and by clicking the html link inside the content box. Couds you pleaase give me a hand ? I don’t know javacript, only html …

    Thanks in advance.

  7. Dave
    April 30, 2014 at 7:59 am #

    Nice work, Gopi. I second Zain’s idea of the shortcode inside the popup. That would come in really handy for some of my applications too.

  8. sb
    May 2, 2014 at 3:12 pm #

    Yes please add ability to add a SHORT CODE in the popup – I need a OPTIN form to pop up but it uses a shortcode. thanks

  9. Israel
    May 2, 2014 at 6:23 pm #

    Hello, nice plugin, thanks, i would like to make the pop up appear on click, is this possible?

  10. Objectif-Mairage
    May 13, 2014 at 12:36 pm #

    Hello ,
    Is there a way to laod the fancybox after 5 min ? And not immédiatly when the visitor come on the page ? (the idea is to tell the visitor : “if you like this site, please like the content ” ) => if he had not yet read the site , it could not want to like the content 😀

    • Gopi Ramasamy
      May 13, 2014 at 12:58 pm #

      Timeout option already available in the admin. Please check plugin admin page in your dashboard.

  11. Vera
    May 27, 2014 at 11:05 pm #

    Hi, is it possible to trigger the popup by clicking an image/link? how? Thanks!!

    • Gopi Ramasamy
      May 28, 2014 at 5:17 am #

      Lots of popup plugin available in the website. please find best suitable plugin.

  12. enffie
    June 4, 2014 at 1:28 pm #

    Hi,Dear:I want to add a popup contact form window to the button of CALL TO ACTION,how could I do?

    • Gopi Ramasamy
      June 5, 2014 at 12:07 pm #

      This plugin opens popup on page load, Please find my other popup plugin (Lots of popup plugin available in this site) for this feature.

  13. natalia
    June 9, 2014 at 4:42 pm #

    Can shortcodes work in widgets?
    I have a 2 language website and I would like to have GROUP1 on one language site and GROUP2 on the second language site?


    • Gopi Ramasamy
      June 10, 2014 at 1:19 pm #

      At present this plugin not support short code in widget.

  14. BAYU
    June 13, 2014 at 10:04 am #

    1. Popup shows on all pages even i’ve already set the Session option to yes
    2. Popup timeout not working

    Help, please check my website

    • Gopi Ramasamy
      June 15, 2014 at 12:44 am #

      Session options may be not working on your server.

      • Ronald
        July 6, 2014 at 10:28 pm #

        There is another way to fix this?

  15. Humphrey Davy
    June 18, 2014 at 11:00 pm #

    Hi Gopi,

    Many thanks for making this free. You also have tons of the other stuff, which I will explore obviously. I have a question. Is it possible to display pop up after every 10 mins automatically, that’s without refreshing the page?

    Once again thanks for your software. It’s lightweight and awesome.


    • Gopi Ramasamy
      June 23, 2014 at 7:53 am #

      At present we don’t have option to display popup every 10 min.

  16. Gregg
    June 22, 2014 at 1:54 am #

    I need to make this responsive. Currently setting the width in the admin sets it for every screen size. This doesnt work of course, because on phones and tablets it might be to wide.

    Do you have any plans to fix this so it is responsive?

    • Gopi Ramasamy
      June 23, 2014 at 7:57 am #

      Already responsive option available in this plugin. you have to enter width and height in %.

      • Gregg
        June 25, 2014 at 4:17 am #

        The % doesnt really work. On a phone you will want it to be 90%, but on a big 20+ inch screen you might want it at 40-60% at most.

        I would still need a way to specify two different sets of width/height.

        There is never a reason to have a popup at 90% of the screen on a big desktop monitor, but on a phone thats standard.

  17. Rod
    June 23, 2014 at 8:30 am #

    Hi Gopi
    Thanks for this plugin.Since the plugin does not support short codes(which would make an excellent plugin by the way) .
    1)How does one add video to the popup?.
    2)Can one add self hosted video to the popup ?
    3)Do you do custom work(you seem to be an expert in popups ?
    Thanks again.

  18. Rajkumar
    June 30, 2014 at 7:33 pm #

    Hi, gopi, I like your wordpress plugin, Email newsletter and pop up plugin, Could you make another plugin to pop up Email Subscriber form for Sign Up newsletter .

  19. Tell Stevens
    July 1, 2014 at 4:05 pm #

    Thanks for this great plugin. It’s simple and works great. My only issue is that I have the setting set to only show the popup once per session but it’s displaying everytime you visit my homepage. Any ideas?


    • Alex
      August 18, 2014 at 10:19 pm #

      Hi, Where you able to find the solution for the problem you post earlier? Im having the same issue

    • Thomas Dale
      August 26, 2014 at 9:51 pm #

      I am having the same issue. Under “Popup Setting” i have the “Session option (Global setting) set to “YES”. The description underneath says “Select YES to show popup once per session, Meaning, popup never appear again if user navigate to another page.” However, when I navigate away from and then back to homepage, the popup is still being displayed.

  20. Blazs
    July 13, 2014 at 9:56 pm #

    Hi, can i force the visitor to read the pop-up, or just exit with the button only? Thanks for the answer!

  21. Karen
    July 18, 2014 at 3:32 pm #

    I though that the timeout field would allow the popup to disappear after so many milliseconds but it seems that means to when it actually appears after page load. Can you set it up so that the popup goes away without a user clicking on it?


    • Gopi Ramasamy
      July 19, 2014 at 4:02 pm #

      At present no option.

  22. Ronny
    August 15, 2014 at 3:34 pm #

    The video is not centered and has scroll..
    Is it possible to get rid of scroll so it displays video centered?
    Nice plugin by the way
    Regards Ronny

  23. Wordpress Form Validation
    August 28, 2014 at 9:20 am #

    Popup with fancybox sounds a nice plugin. How many popup boxes can I create? Is it unlimited?

    • Gopi Ramasamy
      August 30, 2014 at 12:49 pm #

      You can create N number of popup messages. But you can add only one per page.

  24. Patricia
    September 5, 2014 at 6:17 am #

    The popup box is in Shop page using shortcode [popupwfancybox id=”1″]
    The box pops up every time I return to the Shop page during a single session. This behavior occurs in Chrome, IE, and FIrefox.
    In addition, when changing the popup width to 30% it becomes very narrow; also in every browser.
    Please help, I wold love to use this plugin.

  25. Patricia
    September 9, 2014 at 5:48 pm #

    I need an answer to this previous post: The popup box is in Shop page using shortcode [popupwfancybox id=”1″]
    The box pops up every time I return to the Shop page during a single session. This behavior occurs in Chrome, IE, and FIrefox.
    In addition, when changing the popup width to 30% it becomes very narrow; also in every browser.

    • Gopi Ramasamy
      September 10, 2014 at 1:24 am #

      This issue has been fixed in the plugin latest release. Please always use the latest plugin version. Thanks

  26. Sam
    October 7, 2014 at 9:28 pm #

    I used this plugin it’s very nice ! the only problem I have that when I used a table in it there is too much space above ! how can I remove this space please ? thank you

  27. Geert
    October 15, 2014 at 11:47 am #

    How can I change the color and/or opacity of the dimmed overlay?

  28. Syed Mehboob Ali
    October 22, 2014 at 7:53 am #

    i have installed this plugin and pasted the code in the footer to display the welcome popup only on home page but nothing happened, kindly guide me what am i missing to do it???

  29. anna marie
    October 22, 2014 at 6:50 pm #


    i really like the ease of use for this plugin a lot; but i am having a lot of problems getting it to work on the theme i’m using. i have tried adding the shortcodes, i’ve tried the footer (but that really kind of botched things up for me – no doubt my fault). can you please guide me? thanks a million,

  30. ronny
    October 23, 2014 at 2:45 pm #

    Nice plugin!
    I have only one problem. When opening page with the link the music from video starts first than the popup comes with video and again sound. So i’m hearing 2 sounds delayed When i click away the popup the popup video with sound dissapears and the music is still playing.
    Please help!

  31. anna marie
    October 23, 2014 at 8:11 pm #

    is there anyone that can help me?

  32. Kerstein
    October 24, 2014 at 6:40 pm #

    Is there a premium version for this plug-in?

  33. josh
    November 4, 2014 at 1:50 pm #

    Hello I added the banner code into the settings and now I added the shortcode into a post but its not showing?

    Here is the link: http://www.cupoforex.com/binary-brokers/profile/ubinary/


  34. Ginga
    November 9, 2014 at 9:17 am #

    Hi, great plugin, one of the few that really works! :)
    Btw i can’t find the option to show the popup only once per session, can’t see it in the settings.
    Where can i find it? (I’ve the lastest version 1.7)

    • Ginga
      November 9, 2014 at 10:01 am #

      Sorry have found it :)

  35. edgar albandoz
    November 13, 2014 at 3:53 pm #

    Hello. Very nice plugin! But I am trying to set an auto play using the wordpress Video Details (checking Autoplay box) but I am getting double audio. Any help?

    • Paul Simister
      January 7, 2015 at 4:08 pm #

      Is there any update on the audio issues with Autoplay videos???

  36. Ludwig
    December 1, 2014 at 5:38 pm #

    percentage width is not working, when i enter 90% the pop width is 90px.

  37. Local
    December 2, 2014 at 6:26 pm #

    Hello. I have added your pop up to several of my sites and when I use the widget it works fine on every page. Now I am trying to add a pop up only on one page on my site. I added the short code and triple checked everything and the pop up does not work. I tried again with using the widget and it works. I remove the widget and again add short code to a page and nothing pops up.
    I see there are several other comments recently that are saying they are having a problem. Please help.
    Thank you in advance.

  38. onastvar
    December 4, 2014 at 6:26 am #

    I don’t have Popup Setting (Button) option for this plugin Version 1.7 in my wordpress 3.6 under

    Go to Dashboard ==> Settings ==> Popup with fancybox ==> Popup Setting (Button)

    How can I fix it?

  39. Hai in Ro
    December 15, 2014 at 1:29 pm #

    Hello, Looking for a pup who can help me news, appearing on the left, down, please help me

  40. Murtaza
    January 13, 2015 at 8:31 am #

    How i can Display 2 pop ups on homepage after 1minute difference between them…

  41. Murtaza
    January 15, 2015 at 6:23 am #

    Please reply soon….Can i display facebook like code in pop up box….Thanks in advance…

  42. Guido
    January 27, 2015 at 8:16 am #

    Is possible open a specific popup group only into a specific category

  43. Sapna
    January 28, 2015 at 4:54 am #


    I downloaded the latest version of this plug in i.e. Version 1.7 on my localhost. I added the widget into the slider. also I added the following code into footer file.

    But still the popup is not appearing.
    Can you please guide me.


  44. Yael
    February 10, 2015 at 3:45 pm #

    I put in the shortcode but I cannot select Group1 in the pop up with fancy box settings. I have 2 Group2’s -Group 11. How should I move forward?

Comments closed due to heavy spam (back soon). If you have any query please use my contact form click here and mention your plugin name.