adding shortcode to footer.php

Discussion in 'Blogging' started by virtualgeorge, Aug 24, 2011.

  1. virtualgeorge

    virtualgeorge Junior Member

    Joined:
    Sep 20, 2008
    Messages:
    181
    Likes Received:
    156
    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!
     
  2. infTee

    infTee Jr. VIP Jr. VIP

    Joined:
    Mar 2, 2010
    Messages:
    110
    Likes Received:
    137
    Location:
    Ireland
    Try this.
    Code:
    <?php echo do_shortcode('[twitter-widget username="username"]'); ?>