How to Embed a Shortcode from a Plugin Directly into a Template File

I recently came across a great shortcode that I wanted to embed directly into a template, rather than use as a shortcode from within the admin area.

If you ever need to do this you can use the do_shortcode function, and pass any necessary parameters as you would need.

<?php echo do_shortcode('[shortcode with="parameters"]'); ?>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s