Title: Call shortcode from button
Last modified: May 10, 2018

---

# Call shortcode from button

 *  Resolved [ppappas](https://wordpress.org/support/users/ppappas/)
 * (@ppappas)
 * [8 years ago](https://wordpress.org/support/topic/call-shortcode-from-button/)
 * I haven’t had any success trying to call a shortcode from a button.
 * **The button shortcode:**
    This is text to create a button with [su_button] some
   code [/su_button] inside it.
 * **The popup shortcode to be called from the button:**
    [sg_popup id=”3″ event
   =”click”] some code [/sg_popup]
 * Does anyone know how to put these codes together so that when the button is clicked
   the popup will show?
 * Thank you.
    Peter

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

 *  Plugin Author [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * (@basszje)
 * [8 years ago](https://wordpress.org/support/topic/call-shortcode-from-button/#post-10266501)
 * You can’t call shortcodes from other shortcodes in WP. Also you can’t combine
   them.
 * You’ll need to find how to ‘trigger’ the popup. Try to add this to ‘extra classes’
   in the button editor – sg-popup-id-3 , assuming you use this plugin – [https://wordpress.org/plugins/popup-builder/](https://wordpress.org/plugins/popup-builder/)(
   it’s in their FAQ )
 *  Thread Starter [ppappas](https://wordpress.org/support/users/ppappas/)
 * (@ppappas)
 * [8 years ago](https://wordpress.org/support/topic/call-shortcode-from-button/#post-10266577)
 * Hi Bas,
 * That worked!
 * Many thanks for your help and your great plugin
    Peter
 *  Thread Starter [ppappas](https://wordpress.org/support/users/ppappas/)
 * (@ppappas)
 * [8 years ago](https://wordpress.org/support/topic/call-shortcode-from-button/#post-10266581)
 * Resolved
 *  Plugin Author [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * (@basszje)
 * [8 years ago](https://wordpress.org/support/topic/call-shortcode-from-button/#post-10266699)
 * Good!

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

The topic ‘Call shortcode from button’ is closed to new replies.

 * ![](https://ps.w.org/maxbuttons/assets/icon-128x128.png?rev=1378636)
 * [MaxButtons - Create buttons](https://wordpress.org/plugins/maxbuttons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/maxbuttons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/maxbuttons/)
 * [Active Topics](https://wordpress.org/support/plugin/maxbuttons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/maxbuttons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/maxbuttons/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/call-shortcode-from-button/#post-10266699)
 * Status: resolved