Title: Adding short code to WP theme
Last modified: August 14, 2017

---

# Adding short code to WP theme

 *  Resolved [GrexSlo](https://wordpress.org/support/users/gregab/)
 * (@gregab)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/adding-short-code-to-wp-theme/)
 * Hi,
    thanks for great plugin to collect payments 🙂
 * So, I would like to know, how can I add short code of Direct Stripe plugin in
   to WordPress theme?
 * If I try with:
    <?php echo do_shortcode(“[example_shortcode]”); ?>
 * I get the error :/
    Thanks for your help!

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

 *  Thread Starter [GrexSlo](https://wordpress.org/support/users/gregab/)
 * (@gregab)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/adding-short-code-to-wp-theme/#post-9409707)
 * I get this error:
 * Parse error: syntax error, unexpected ‘[‘ in /home/public_html/domain.com/wp-
   content/themes/constructzine-lite/front-page.php on line 116
 *  Plugin Author [Nicolas Figueira](https://wordpress.org/support/users/nahuelmahe/)
 * (@nahuelmahe)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/adding-short-code-to-wp-theme/#post-9418142)
 * Hello [@gregab](https://wordpress.org/support/users/gregab/),
 * Thank you for using Direct Stripe.
 * Your error indicates an error in the shortcode syntax, I would use single quotes
   like :
 * `echo do_shortcode('[direct-stripe type="payment" amount="1000"]');`
 * Let me know how it goes.
 * Best regards,
 *  Thread Starter [GrexSlo](https://wordpress.org/support/users/gregab/)
 * (@gregab)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/adding-short-code-to-wp-theme/#post-9419838)
 * Hi Nicolas,
    thanks for your answer.
 * I fix this problem with this code:
    `<?php if( is_front_page() ) echo do_shortcode('[
   instashow id="1"]' ); ?>`
 * I am also now try your code, but still not working.
 * This problem is resolved.
 * Thank you 🙂
 *  Plugin Author [Nicolas Figueira](https://wordpress.org/support/users/nahuelmahe/)
 * (@nahuelmahe)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/adding-short-code-to-wp-theme/#post-9420256)
 * Hello [@gregab](https://wordpress.org/support/users/gregab/),
 * I’m glad it’s all resolved.
 * The equivalent for Direct Stipe is :
    `<?php if( is_front_page() ) echo do_shortcode('[
   direct-stripe type="payment" amount="1000"]' ); ?>`
 * Best regards

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

The topic ‘Adding short code to WP theme’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/direct-stripe_7787ff.svg)
 * [Direct Stripe](https://wordpress.org/plugins/direct-stripe/)
 * [Support Threads](https://wordpress.org/support/plugin/direct-stripe/)
 * [Active Topics](https://wordpress.org/support/plugin/direct-stripe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/direct-stripe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/direct-stripe/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Nicolas Figueira](https://wordpress.org/support/users/nahuelmahe/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/adding-short-code-to-wp-theme/#post-9420256)
 * Status: resolved