Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

insert comment author profile image and link

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › insert comment author profile image and link

  • This topic has 1 reply, 2 voices, and was last updated 13 years, 10 months ago by admin.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 7, 2011 at 6:12 am #4257
    addison
    Member

    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 ‘

  • Comment: ‘.substr( $comment->comment_content, 0, 150 ).’..
    ‘.date( $date_format, strtotime( $comment->comment_date ) ).’
    Post: comment_post_ID ).'”>’.get_the_title( $comment->comment_post_ID ).’
  • ‘;

    }

    echo ‘
    ‘;

    } else {

    echo ‘<p>No comments</p>’;

    }

    Thanks as always for the help!

    Addison

September 8, 2011 at 1:33 am #36389
admin
Keymaster

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

  • Author
    Posts
  • Viewing 2 posts - 1 through 2 (of 2 total)
    • You must be logged in to reply to this topic.
    Log In

    Forum Related

    • Forum Home
    • Forum Search
    • Forum Registration
    • Forum Login

    Support Related Forms

    • Contact Us
    • Customer Support
    • Request a Plugin Update
    • Request Fresh Download Links

    Useful Links

    • Plugin Upgrade Instructions
    • WP eStore Documentation
    • WP eMember Documentation
    • WP Affiliate Platform Documentation
    • Tips and Tricks HQ Home Page
    • Our Projects

    Quick Setup Video Tutorials

    • WP eStore Video Tutorial
    • WP eMember Video Tutorial
    • WP Affiliate Platform Video Tutorial
    • Lightbox Ultimate Video Tutorial

    Our Other Plugins

    • WP Express Checkout
    • Stripe Payments Plugin
    • Simple Shopping Cart Plugin
    • Simple Download Monitor

    Copyright © 2025 | Tips and Tricks HQ