WordPress shortcodes are very nice and easy to use but you can insert them using a post/page editor only. This WordPress tip will show you how to add WordPress shortcodes in any your theme files using a little WordPress API function that is very easy and simple.
Using the do_shortcode() function to add WordPress Shortcodes to your theme files
Place the following code in your template/theme file to insert any shortcode you want.
echo do_shortcode("[your_shortcode_here]");
Yes. That is it! Your shortcode will be displayed on your template. You need to replace [your_shortcode_here] with the shortcode you want to insert in this template file.
The post WordPress Shortcodes in Theme files appeared first on Deluxe Themes.