How To Add Wordpress Shortcode to PHP Template File

If you're trying to add a Wordpress Shortcode to your custom theme page template you will find that outputting the shortcode in HTML won't work like this:

<p>[shortcode here]</p>

You will need to use the Wordpress function do_shortcode.

This will work

<?php echo do_shortcode('[shortcode_here]'); ?>

Comments

Popular posts from this blog

How To: Get Cell C HSDPA USB dongle to work in Ubuntu

How to Display Custom Wordpress Header with Google Analytics Site Tage and Adwords Site Tag

Enqueue Stylesheet or Javascript on just one Wordpress Page or Post