Get Comment Author Meta
-
This is driving me crazy, so any help is much appreciated.
I use the following code to add a ‘twitter’ field to user profiles:
<?php add_filter('user_contactmethods', 'my_user_contactmethods'); function my_user_contactmethods($user_contactmethods){ $user_contactmethods['twitter'] = 'Twitter Username'; return $user_contactmethods; } ?>Then, I can use this function to display the post Author’s twitter username IF they have entered the field in their profile:
<?php $username = get_the_author_meta('twitter'); if ( $username ) { ?> <?php } ?>Now I’m trying to get the twitter handle of the comment author to show in each comment. Using this (and other various attempts) did not work:
<?php $username = get_comment_author_meta('twitter'); if ( $username ) { ?> <?php } ?>Any ideas? What variable do I need here?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Get Comment Author Meta’ is closed to new replies.