Title: Placing shortcode in tempalte
Last modified: August 20, 2016

---

# Placing shortcode in tempalte

 *  Resolved [wpsitedesign](https://wordpress.org/support/users/wpsitedesign/)
 * (@wpsitedesign)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/placing-shortcode-in-tempalte/)
 * 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.
 * [http://wordpress.org/extend/plugins/rotatingtweets/](http://wordpress.org/extend/plugins/rotatingtweets/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Martin Tod](https://wordpress.org/support/users/mpntod/)
 * (@mpntod)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/placing-shortcode-in-tempalte/#post-3398408)
 * The problem with your first line is the inverted commas. Try:
 *     ```
       <?php echo do_shortcode('[rotatingtweets screen_name="my_id"]'); ?>
       ```
   
 * or
 *     ```
       <?php echo do_shortcode("[rotatingtweets screen_name='my_id']"); ?>
       ```
   
 *  Thread Starter [wpsitedesign](https://wordpress.org/support/users/wpsitedesign/)
 * (@wpsitedesign)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/placing-shortcode-in-tempalte/#post-3398419)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/rotatingtweets.svg)
 * [Rotating Tweets (Twitter widget and shortcode)](https://wordpress.org/plugins/rotatingtweets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rotatingtweets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rotatingtweets/)
 * [Active Topics](https://wordpress.org/support/plugin/rotatingtweets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rotatingtweets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rotatingtweets/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [wpsitedesign](https://wordpress.org/support/users/wpsitedesign/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/placing-shortcode-in-tempalte/#post-3398419)
 * Status: resolved