Support » Plugin: Rotating Tweets (Twitter widget and shortcode) » Placing shortcode in tempalte

  • Resolved wpsitedesign


    Is it possible to implement the shortcode within my template ?

    I have tried using this code but it doesn’t seem to work.
    <?php echo do_shortcode('[rotatingtweets screen_name='my_id']'); ?>

    My work around is to create a post and reference it within my template using
    <?php query_posts('category_name=twitter_feed&showposts=1'); ?>

    Preferably I would like to directly reference the plugin so that I don’t have a random post. Hope that makes sense.

    Great plugin by the way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Martin Tod


    The problem with your first line is the inverted commas. Try:

    <?php echo do_shortcode('[rotatingtweets screen_name="my_id"]'); ?>


    <?php echo do_shortcode("[rotatingtweets screen_name='my_id']"); ?>

    Brilliant! the first change worked.

    I also had to change all the settings such as
    show_meta_timestamp = '0'
    to `
    show_meta_timestamp = "0"

    Thanks for such a quick response.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Placing shortcode in tempalte’ is closed to new replies.