WordPress.org

Support

Support » Plugins and Hacks » Rotating Tweets (Twitter widget and shortcode) » [Resolved] Placing shortcode in tempalte

[Resolved] 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/

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

    @mpntod

    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']"); ?>

    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 ‘[Resolved] Placing shortcode in tempalte’ is closed to new replies.
Skip to toolbar