• Resolved mcdeth

    (@mcdeth)


    hi, i’m adding some html to thank you page via plugin, is it possible somehow to execute shortcode from other plugin?

Viewing 1 replies (of 1 total)
  • <?php echo do_shortcode( '[your_shortcode]' ); ?>

    But in general the question is not entirely clear.

    You can display the shortcode via PHP – the code above.
    You can create your own shortcode using snippets.
    You can display a shortcode via PHP in a specific place on the site using hooks.

    add_action('HOOK', 'your_shortcode_function');
    
    function your_shortcode_function() {
        echo do_shortcode('[your_shortcode]');
    }
    • This reply was modified 11 months, 3 weeks ago by polarone.
Viewing 1 replies (of 1 total)
  • The topic ‘shortcode inside php’ is closed to new replies.