- This topic has 1 reply, 2 voices, and was last updated 13 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › insert comment author profile image and link
Hello,
I was just wondering how I should add the insert the comment author profile image and link:
I’m putting together a hidden section and want to display the comment author connected to the emember profile on this section and the comments so that people can click on that image and go to an emember users profile.
Please let me know how to do this for the comments as well as the hidden writing section shown here to show you what is currently displayed in the code:
// fetch posts in all those categories
$posts = get_objects_in_term( $category_list, ‘category’ );
$sql = “SELECT comment_ID, comment_date, comment_content, comment_post_ID, comment_author
FROM {$wpdb->comments} WHERE
comment_post_ID in (“.implode(‘,’, $posts).”) AND comment_approved = 1
ORDER by comment_date DESC LIMIT $ppp OFFSET $custom_offset”;
$comments_list = $wpdb->get_results( $sql );
if ( count( $comments_list ) > 0 ) {
$date_format = get_option( ‘date_format’ );
echo ‘
foreach ( $comments_list as $comment ) {
$whoisit = comment_author();
echo ‘
‘;
}
echo ‘
‘;
} else {
echo ‘<p>No comments</p>’;
}
Thanks as always for the help!
Addison
eMember doesn’t create a separate profile page for each user. Whoever is logged in as a member can access his profile details from the profile page. You can’t hardcode a link to the profile page of a particular member.
The way any user can access other members profile is via the “public profile listing” option if this is enabled:
http://www.tipsandtricks-hq.com/wordpress-membership/how-to-use-public-profile-listing-276