Title: Shortcode
Last modified: August 22, 2016

---

# Shortcode

 *  [jmd81](https://wordpress.org/support/users/jmd81/)
 * (@jmd81)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/shortcode-230/)
 * Hi,
    I want to display the popup on specific pages (I want to use it as a contact
   form). Where can I get the shortcode? And how can I add it to a menu item (a 
   menu item called “Contact Us”)?
 * Regards,
 * [https://wordpress.org/plugins/popup-with-fancybox/](https://wordpress.org/plugins/popup-with-fancybox/)

Viewing 1 replies (of 1 total)

 *  [rockycolttumtum](https://wordpress.org/support/users/rockycolttumtum-1/)
 * (@rockycolttumtum-1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/shortcode-230/#post-5462079)
 * The easiest way to do this is in your theme is using _inline content_.
 * **First**, go to your Settings > Media admin page and activate the Inline option
   under the FancyBox settings. After saving, the amdin page will show a new section
   called Inline where you can tweak its parameters.
 * **Next**, in your theme you need to create a DIV for your pop-up content. INSIDE
   that you need to run a php script to call your shortcode. Here is what mine looks
   like:
 *     ```
       <div style="display:none" class="fancybox-hidden">
            <div id="fancy-contact-form" class="hentry" style="width:460px;height:380px;">
       	<h3>Contact us!</h3>
       	<?php echo do_shortcode("[yourshortcodeforform]"); ?>
            </div>
         </div>
       ```
   
 * **Finally**; you will need to have a link that will actually call that hidden
   content. Here is what mine looks like:
 * `<a href="#fancy-contact-form" class="fancybox-inline btn btn-default">Send us
   a quick message!</a>`
 * _Two things to note: _
    1) The id from the hidden content MUST match the href
   content with the link; and you MUST put a “#” in front of the matching href. 
   So if your hidden div id was “popout-form”; your href would have to be “#popout-
   form”. 2) Replace the [yourshortcodeforform] with your specific shortcode for
   your form. Also remember that when calling shortcodes in php you CANNOT use double
   quotes (i.e. “) in your shortcode; change them to single quotes (i.e. ‘).
 * For more information check out [the FAQ where inline content is mentioned](http://status301.net/wordpress-plugins/easy-fancybox/).
 * Hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/popup-with-fancybox/assets/icon-256x256.png?rev=1017781)
 * [Popup with fancybox](https://wordpress.org/plugins/popup-with-fancybox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-with-fancybox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-with-fancybox/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-with-fancybox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-with-fancybox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-with-fancybox/reviews/)

## Tags

 * [contact-form](https://wordpress.org/support/topic-tag/contact-form/)
 * [popup](https://wordpress.org/support/topic-tag/popup/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 1 reply
 * 2 participants
 * Last reply from: [rockycolttumtum](https://wordpress.org/support/users/rockycolttumtum-1/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/shortcode-230/#post-5462079)
 * Status: not resolved