Easy FancyBox
[resolved] Using Easy Fancy Box plugin with Gravity Forms in Header widget area (4 posts)

  1. WebMC
    Posted 4 years ago #

    I am able to link to my Gravity form using this code`<div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1">
    [gravityform id="1" ajax="true"]

    <a href="#fancyboxID-1" class="fancybox">Click here to enter your details</a>
    ` on a page oor post, however I cannot get the short codes for the form to work in the header widget area of my site here that I am working on (it is not yet live)

    Any help will be most appreciated


  2. RavanH
    Plugin Author

    Posted 4 years ago #

    This is not really a question related to Easy FancyBox but I can help you none the less.

    The 'problem' here is that normally in WordPress, shortcodes inside text widgets do not get processed. Only in post/page content. However, there are ways to make WordPress handle shorcodes in (text) widgets.

    One of them is to install one of the plugins that are built to activate this function. There are several on WordPress Extend (search for 'shortcode widget' for example)... But I usually use the plugin Widget Logic http://wordpress.org/extend/plugins/widget-logic/ which provides some excellent (but advanced) functions to control the appearance of certain widgets on certain pages/categories/etc. and at the same time it has a neat little option available at the bottom of your normal Widget admin page to activate the so called widget_content filter.

    If you do not want to do it via a plugin, you can simply add this line to your themes functions.php

    add_filter('widget_text', 'do_shortcode', 11);
  3. shamburg
    Posted 3 years ago #

    I am a newbie and trying to add the fancybox code to a widget title, I am also using FB in conjunction with CF7.

    The link works from a page, but doesnt work from a widget title. Can you help?

  4. RavanH
    Plugin Author

    Posted 3 years ago #

    As far as I know, WordPress does not allow links in widget titles... To create links in the sidebar, use a text widget content field.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic