WordPress – Running a Shortcode INSIDE of Theme Files

WordPressMany plugins utilize shortcodes for easy insertion.

While these are normally geared towards being used in posts and pages, they can also be used in the theme files / template itself!

And the best part? It’s simple to do.

How simple?

Well, one line of code is all it takes!

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

Easy as pie.

…And almost as tasty!

Leave a Reply

Your email address will not be published.