1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

adding shortcode to footer.php

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

  1. virtualgeorge

    virtualgeorge Junior Member

    Joined:
    Sep 20, 2008
    Messages:
    180
    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 Junior Member

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