WordPress.org

Ready to get started?Download WordPress

Forums

Rotating Tweets (Twitter widget and shortcode)
[resolved] Where the hell do you put shortcode? (6 posts)

  1. barryglick
    Member
    Posted 1 year ago #

    Okay, I know that you can use shortcode in your posts and pages, but how the heck do you use it to install Rotating Tweets???? I can use the Widget, of course, but it bugs me when I download a plugin, and the developer assumes I fully understand code. Maybe that's understood, but I have no idea where to insert this infernal shortcode. I tried it in a text widget, I tried it in functions.php. It sounds like it is something so easy that everyone just knows about it, but I don't! Please, developers, realize that there are some of us out here, who are just wanting to blog, and expect the plugins to just, well, be installed and behave themselves. I am willing to do the work, I just don't know what work to do where. Can anyone help me? And by help, I mean step by step--you type the code here, it works like this, voila.

    Barry

    http://wordpress.org/extend/plugins/rotatingtweets/

  2. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    Barry,

    You put the shortcode in posts or page as a new line of ordinary text.

    You might end up with something like:

    Here is my post
    [rotatingtweets screen_name='mpntod']
    And here is some more text in my post.

    Literally, all you do is

    • add a post
    • Add something like [rotatingtweets screen_name='mpntod'] on a new line to the content of your post
    • hit 'publish' or 'preview'

    and you're done.

    Then, when you look at the actual page, you will see rotating tweets instead of the shortcode.

    There is some useful extra information at http://codex.wordpress.org/Shortcode

    Martin

  3. barryglick
    Member
    Posted 1 year ago #

    Thanks for you response. But won't the post scroll off the bottom of the page? Does this get incorporated into the sidebar, or do I have to keep posting?

    Is there ANY instance where you include short code in a PHP file, like functions.php, because I tried that and functions.php didn't like it one bit!

    Thanks again for your help.

    Barry

  4. barryglick
    Member
    Posted 1 year ago #

    Martin,

    Actually, the link you sent me to implies you CAN use short code inside PHP tags. <?php echo do_shortcode('[gallery]'); ?>, for example. Is there any documentation on how to use short codes this way?

    Barry

  5. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    Barry,

    All the options for the shortcode are at http://wordpress.org/extend/plugins/rotatingtweets/installation/

    You wouldn't normally put something like

    <?php echo do_shortcode('[gallery]'); ?>

    in a functions.php file since it immediately displays the information in question - but you might consider putting it straight into another template file (like footer.php or page.php for example).

    Normally though, if you wanted to put rotating tweets into a particular area of your template and it wasn't in a post (where you would use a shortcode) or in a widget area (where you would use a widget), I'd be tempted to add an extra widget area to your template. You can do this by adding some code to the template and by adding a register_sidebar command to functions.php using similar code to that outlined here.

    Hope this helps,

    Martin

  6. barryglick
    Member
    Posted 1 year ago #

    Thanks for the info, Marin!

    Barry

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic