Using Shortcode in Template

Supplemental 46 views
0 Flares 0 Flares ×

You can use this snippet pretty much anywhere in your theme files to execute a shortcode:

<?php echo do_shortcode('[catlist id=1 numberposts=5)]'); ?>

For Reference:

Short code outside page or post?

Tagged with:
Posted in Wordpress


Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

No Trackbacks.


Register | Lost your password?
0 Flares Twitter 0 Facebook 0 Google+ 0 0 Flares ×