Support » Plugin: Easy FancyBox » PDF not popping up correctly when clicked


    I’m trying to have the menu of this restaurant pop-up when you click “Menu” at the top, but whenever I click it it just goes straight to the PDF. I have the PDF uploaded to my media area and linked through the menu item and the url does end with “.pdf”.

    I’ve tried it in Firefox, Google Chrome and on my phone and they’re all the same.

    Any idea how to fix this? Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author RavanH


    Hi dcorde,

    The FancyBox is actually working. You can see it pop up a lightbox for a split second before the PDF ‘breaks out’ and opens in the top browser tab frame.

    And at that point there is the following error thrown by the themes script app.js :

    Resource interpreted as Document but transferred with MIME type application/pdf: "".

    I have no idea why that script would be interfering with this PDF embedding but apparently it does.

    Try the following:

    Go to Settings > Media and deactivate the PDF option. Then activate the iFrame option. Next, go to Appearance > Menus and give the menu entry the class fancybox-iframe. To give menu entries a class, you might need to open the Screen Options (top right) and check the box CSS Classes.

    Thanks for the response.

    I tried out the class and switching to iframe and for some reason it’s still not sticking. I also tried the same thing with ‘iframe-pdf’ and it’s still the same. Not sure what’s holding it back.

    My uploads folder has been acting weird and not been letting my site access it if that has any effect, but this PDF is already uploaded so I doubt it’s really related.

    Plugin Author RavanH


    It’s very weird.

    What happens if you create an iframe with that same PDF in it, right inside the same page content?

    Or if you change the URL in the Menu link to another html page or pdf file?

    How do I go about creating an iframe exactly? I’ve never made one but that actually might work better for this than even using a pdf at all. Do I need a separate iFrame plugin? If you could link me to somewhere for info on this that would be great.


    Plugin Author RavanH



    Plugin Author RavanH


    When editing a page, go to the HTML tab and enter something like the following html code example:

    <iframe src="http://url.of/your/file.pdf" height="400px" width="100%"></iframe>

    Tip: In some cases such code will get stripped away by WordPress upon saving or by the rich text editor when switching back to the View tab. If you run into such issues, try installing the Jetpack plugin. With the shortcodes module activated, you have a [iframe] shrotcode available that will not get stripped.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PDF not popping up correctly when clicked’ is closed to new replies.