Adds an additional field to the user profile page where the user can enter their Twitter username.
The shortcode is
You can use it in posts, pages, and text widgets.
You can add several parameters to the shortcode if you want:
[twitter-user link="yes"] will display your username with a link to your Twitter Profile (<a href="http://twitter.com/%username%">%Username%</a>)
[twitter-user link="yes" title="Title tag content here"] allows you to add a custom
title tag to the link
[twitter-user userid="2"] will display the username for the user with an ID of 2
There's two ways you can display your Twitter username in your template files:
<?php echo do_shortcode( '[twitter-user]' ); ?>. You can use all the parameters listed under "How do I use the shortcode?"
<?php the_author_meta( 'twitter' ); ?>. If you use it outside the loop, you should add an user ID to it by using
<?php the_author_meta( 'twitter', 1 ); ?> where 1 is the user ID. This will continue to work even after you remove the plugin (but the usernames can't be edited then).
First of all, make sure that the plugin is activated. If you add the to your theme file(s), make sure that you use
<?php the_author_meta('twitter', 1); ?> if it's OUTSIDE the loop.
Requires: 2.9 or higher
Compatible up to: 4.1.13
Last Updated: 2 years ago
Active Installs: 200+
Got something to say? Need help?