Title: shortcodes rendered manually don&#8217;t function
Last modified: March 29, 2017

---

# shortcodes rendered manually don’t function

 *  Resolved [hughc](https://wordpress.org/support/users/hughc/)
 * (@hughc)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/shortcodes-rendered-manually-dont-function/)
 * Hi,
    I’m new to the plugin, and I’m not a novice dev, and I’ve struck exactly
   the same error message [as previously reported here](https://wordpress.org/support/topic/post-popups-not-working-anymore/#post-8963486).
   My use case may be different.
 * I’m trying to generate both a popup and trigger button on the fly, on a custom
   template page. The popup is not being inserted in the post-body field in the 
   Editor, but instead I’m using PHP to generate the shortcode tags and then `do_shortcode()`
   to render it. Same for the trigger buttons.
 * The popup is also not pre-defined in the popup list (and I couldn’t see anywhere
   in the docs that this was stated as a requirement).
 * Trigger shortcode:
 * `[popup_trigger tag='button' id='new-enquiry']<li><span class="title">9ct</span
   > - <span class="price">$1,490</span></li>[/popup_trigger]`
 * Popup shortcode:
 * `[popup id="new-enquiry" theme_id="3098"][gravityform title='false' description
   ='false' ajax='true' id='1'][/popup]`
 * Rendering these gives me the buttons, as expected, and I can see the popup, with
   the gravity form inside it, hidden in the DOM.
 * With no other popups present on the page (apart from the one defined by the shortcode),
   clicking a trigger button does nothing – I assume this is because the plugin 
   is unaware that there’s a popup on screen, and the relevant JS is not loaded?
   I couldn’t see a documenteed way to manually load it.
 * If a pre-defined popup is present in the DOM, with its ID targeted by the trigger
   buttons, it works. If it has the same ID as the shortcode generated one, then
   it shows (not the shortcode one).
 * But if the button targets the shortcode generated popup only, clicking the button
   gives the same JS error as previously reported.
 * In site.js on line 1182:
 * `if (settings.mobile_disabled !== undefined && settings.mobile_disabled) {`
 * settings is undefined which means $popup.popmake(‘getSettings’) is returning 
   nothing.
    I’m stumped. Unsure if I’m outside the bounds of how the shortcodes
   must be used in order to function.
 * PS as an aside, I tried turning on debug, but I get a different console error
   as the page loads:
 *     ```
       case “click_open”:
          pum_debug.click_trigger(t, o.settings),
          console.log(i.label_cookie, o.settings.cookie.name)
       }
       ```
   
 * returns the following JS error:
 * `cannot read property ‘name’ of undefined`
 * Seems to me that my popup is not being correctly initialised in some way, that
   one created in the post editor would be…?
    -  This topic was modified 9 years, 2 months ago by [hughc](https://wordpress.org/support/users/hughc/).
      Reason: formatting

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [waltmesser](https://wordpress.org/support/users/waltmesser/)
 * (@waltmesser)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/shortcodes-rendered-manually-dont-function/#post-8970478)
 * [@hughc](https://wordpress.org/support/users/hughc/)
 * Sorry you’re having difficulties, I’m sure we can this resolved.
 * I’ll have our Lead Dev [@danieliser](https://wordpress.org/support/users/danieliser/)
   take a look as soon as possible.
 * Thank you for being patient.
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years ago](https://wordpress.org/support/topic/shortcodes-rendered-manually-dont-function/#post-9139426)
 * [@hughc](https://wordpress.org/support/users/hughc/) – Sorry I didn’t reply sooner.
   I just saw this ticket when trying to clean up old un-closed topics.
 * We can force the scripts to load using a constant POPMAKE_FORCE_SCRIPTS.
 * I will try debugging the shortcode popups this week and look to patch any missing
   settings issues. I think you are correct and the shortcode popups got left behind
   in the last update. Need to fix that for sure.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘shortcodes rendered manually don’t function’ is closed to new replies.

 * ![](https://ps.w.org/popup-maker/assets/icon-256x256.gif?rev=3097653)
 * [Popup Maker - Boost Sales, Conversions, Optins, Subscribers with the Ultimate WP Popup Builder](https://wordpress.org/plugins/popup-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-maker/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/shortcodes-rendered-manually-dont-function/#post-9139426)
 * Status: resolved