WordPress.org

Forums

Easy FancyBox
[resolved] Linking from a Wdget Title (9 posts)

  1. shamburg
    Member
    Posted 2 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?

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    What is the exact link code you are using in the widget title?

  3. shamburg
    Member
    Posted 2 years ago #

    <a href="#contact_form_pop">Click Here for a Quote Today!</a>
    
    <div style="display:none" class="fancybox-hidden">
        <div id="contact_form_pop">
         [contact-form-7 id="19" title="Service Request"]
        </div>
    </div>
  4. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    OK put this in the widget title:

    <a href="#contact_form_pop" class="fancybox">Click Here for a Quote Today!</a>

    (notice that class there!)

    And then put the rest of your code in the text body of a text widget. Avoid having the whole form wrapped in a H3 (widget title) tag.

  5. shamburg
    Member
    Posted 2 years ago #

    Didnt work. The widget automatically removed the code and left the Click Here....

    BTW - I am using a standard text widget.

  6. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    OK, then try NOT using the title field (leave it empty) and paste this code as widget content:

    <h3><a href="#contact_form_pop" class="fancybox">Click Here for a Quote Today!</a></h3>
    
    <div style="display:none" class="fancybox-hidden">
        <div id="contact_form_pop">
         [contact-form-7 id="19" title="Service Request"]
        </div>
    </div>

    I'm assuming here that your widget titles use the H3 tag but that might be different on your theme. And you might need to add a class to the H3 tag to make it conform all other widget titles...

  7. shamburg
    Member
    Posted 2 years ago #

    That is exactly what I have been doing as a workaround. That works, I was just hoping to get it working "correctly".

  8. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    It's a WordPress thing...

  9. shamburg
    Member
    Posted 2 years ago #

    Thanks RavanH.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.