Many WordPress plugins these days support shortcodes to simplify placing their functions to posts or pages. However, you don’t always want to insert a shortcode to posts, but you might also need it to be displaying in a theme.

WordPress Shortcode Placement

How to Add a Shortcode to WP Theme Files?

If you want to place a plugin’s [shortcode] directly to the theme’s files, you will need to use a php code:

<?php echo do_shortcode('[shortcode attribute1="entry1" attribute2="entry2"]'); ?>

Please note, this was en example, your own shortcode and its attributes may look different.


  1. I knew there must be some way to call the plugin function from the theme file. It’s funny that some plugins only support widgets. Thanks Sam!

Related Posts