Title: Short Code in Short
Last modified: August 22, 2016

---

# Short Code in Short

 *  Resolved [fabone](https://wordpress.org/support/users/fabone/)
 * (@fabone)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/short-code-in-short/)
 * Hello,
 * May i use ShortCode from other plugins in your PHP short code ?
 * For example may i do this :
    <?php
 * if ($var1==”1″)
    { echo ‘<p>[shortcode 1]>/p>’; } else { echo ‘<p>[shortcode 
   2]>/p>’; } ?>
 * Thank you for your answer.
 * [https://wordpress.org/plugins/post-snippets/](https://wordpress.org/plugins/post-snippets/)

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

 *  [Johan Steen](https://wordpress.org/support/users/artstorm/)
 * (@artstorm)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/short-code-in-short/#post-5873131)
 * Hi,
 * Yes, that should be possible. When you want to execute a shortcode from PHP, 
   you usually have to wrap the content with the do_shortcode() function in WordPress.
   Post Snippets perform a do_shortcode() on shortcodes created just before output,
   so you should be able to have PHP shortcodes with shortcodes inside them without
   having to add a do_shortcode() in your snippet.
 * Cheers,
    Johan
 *  Thread Starter [fabone](https://wordpress.org/support/users/fabone/)
 * (@fabone)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/short-code-in-short/#post-5873141)
 * Hello,
 * Thank you.
 * I saw it was possible.
 * Do you know i can display n records from sql table then update field, delete 
   records or insert new records and finally save all modifications in database ?
 *  Thread Starter [fabone](https://wordpress.org/support/users/fabone/)
 * (@fabone)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/short-code-in-short/#post-5873195)
 * Hello,
 * It will be great if the editor window (where we write the PHP code) would be 
   much bigger and the tabs key works (you know because of {} to make the code more
   readable).
 * Thank you.
 * Fabrice

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

The topic ‘Short Code in Short’ is closed to new replies.

 * ![](https://ps.w.org/post-snippets/assets/icon-128x128.gif?rev=2545587)
 * [Post Snippets - Custom WordPress Code Snippets Customizer](https://wordpress.org/plugins/post-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/post-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-snippets/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [fabone](https://wordpress.org/support/users/fabone/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/short-code-in-short/#post-5873195)
 * Status: resolved