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.ww.wp.xz.cn/Shortcode
Martin
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
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
Barry,
All the options for the shortcode are at http://ww.wp.xz.cn/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
Thanks for the info, Marin!
Barry