Only show Twitter profile info if filled in….
-
Hi all I have used the Yoast method to add Twitter contact field in my user profiles. Works great.
Link: User Contact Fields in WordPress 2.9But now I would like to show a Twitter user link only when the field is filled in… How can I do this?
I use
the_author_meta('twitter', $current_author->ID)
to show the link, but how can I make it only show the link if the field is filled in?Code I use in functions.php:
function add_twitter_contactmethod( $contactmethods ) { // Add Twitter $contactmethods['twitter'] = 'Twitter'; // Remove Yahoo IM unset($contactmethods['yim']); return $contactmethods; } add_filter('user_contactmethods','add_twitter_contactmethod',10,1);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Only show Twitter profile info if filled in….’ is closed to new replies.