adding shortcode to footer.php

virtualgeorge

Junior Member
Joined
Sep 20, 2008
Messages
181
Reaction score
55
If I have a widget that allows a short code for posting on pages, how could I insert that same short code so my widget displays in an area other than page content or a widget? Like in the footer on my template?

Like when I put the code
Code:
[twitter-widget username="username"]
in a div or html it doesn't display the widget, just the shortcode.

thanks!
 
Try this.
Code:
<?php echo do_shortcode('[twitter-widget username="username"]'); ?>
 
Back
Top