-
WordPress Short Codes in Templates
How do you put shortcodes in your template files?
I came across a problem the other day. I found a plugin I wanted to use but it didn’t have any php calls to invoke it, only WordPress shortcodes. I scanned the forums and found a very good alternative from Dukessa. By using a WordPress call to the short code I could add the call to the header.php file.
Here is the call format:
<?php echo do_shortcode(’[shortcode]‘); ?>
Here is an example of how to embed a short code in a header.php file for NextGEN Gallery plugin.
<?php echo do_shortcode(’[slideshow id=1]‘); ?>
Give it a try, it works great.
Plurk This Post
Digg This Post
Ping This Post
Stumble This Post
Bad Behavior has blocked 264 access attempts in the last 7 days.
Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.


