• Resolved GrexSlo

    (@gregab)


    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

    (@gregab)

    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

    (@nahuelmahe)

    Hello @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

    (@gregab)

    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

    (@nahuelmahe)

    Hello @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.