How To Use Shortcodes in Wordpress Templates

How To Use Shortcodes in WordPress Templates

Many WordPress plugins make use of shortcodes, which are small bits of text (enclosed with []) which you can use in content areas inside posts/pages.

However, you may have the need to use a shortcode form within a php template file.

Here is how to do it…

<?php echo do_shortcode("[shortcode]"); ?>

Leave a Reply

Your email address will not be published. Required fields are marked *