WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Twitter Profile Field

Adds an additional field to the user profile page where the user can enter their Twitter username.

How do I use the shortcode?

The shortcode is [twitter-user]

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

How to use Twitter Profile Field in template files

There's two ways you can display your Twitter username in your template files:

  1. Use <?php echo do_shortcode( '[twitter-user]' ); ?>. You can use all the parameters listed under "How do I use the shortcode?"

  2. Use <?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).

It don't work - What should I do?

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: 3.9.2
Last Updated: 2014-4-16
Downloads: 4,278

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1 100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1