Title: Call shortcode with PHP
Last modified: February 22, 2019

---

# Call shortcode with PHP

 *  Resolved [oguido](https://wordpress.org/support/users/oguido/)
 * (@oguido)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/call-shortcode-with-php/)
 * Hello. How can I do_shortcode() with yours? it’s not working…

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

 *  Plugin Author [UIUX Lab](https://wordpress.org/support/users/uiuxlab/)
 * (@uiuxlab)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/call-shortcode-with-php/#post-11238059)
 * Hi, You can refer to:
 *     ```
       <?php
       if ( class_exists( 'UixShortcodes' ) ) {
       	echo do_shortcode( "[uix_xxx]" );
       }
       ?>
       ```
   
 * it works!
 *  Thread Starter [oguido](https://wordpress.org/support/users/oguido/)
 * (@oguido)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/call-shortcode-with-php/#post-11250373)
 * ok it works great, thanks!!!!
 *  [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/call-shortcode-with-php/#post-11698569)
 * [@uiuxlab](https://wordpress.org/support/users/uiuxlab/) – I don’t see how that
   helps. That simply checks if the shortcode class is loaded. That won’t make do_shortcode
   operate any differently. If it does your shortcodes class needs to be reworked
   to instantiate on init, not just when the class is asked for explicitly.
 * Otherwise echo do_shortcode( ” ); should just work.
 *  Plugin Author [UIUX Lab](https://wordpress.org/support/users/uiuxlab/)
 * (@uiuxlab)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/call-shortcode-with-php/#post-11701970)
 * Yes, you don’t need to check the class, directly do.
    `echo do_shortcode( ” );

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

The topic ‘Call shortcode with PHP’ is closed to new replies.

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

 * 4 replies
 * 3 participants
 * Last reply from: [UIUX Lab](https://wordpress.org/support/users/uiuxlab/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/call-shortcode-with-php/#post-11701970)
 * Status: resolved