WordPress.org

Ready to get started?Download WordPress

Forums

Rotating Tweets (Twitter widget and shortcode)
[resolved] Placing shortcode in tempalte (3 posts)

  1. wpsitedesign
    Member
    Posted 1 year ago #

    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/

  2. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    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']"); ?>
  3. wpsitedesign
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic