• Resolved lmpierce

    (@lmpierce)


    Comments on the Ultimate Member User profile page under the Comments tab are not showing up. It says “This user has not made any comments.” and yet I know he has because I can see them in my WP dashboard and on the pages where he has made the comments his UM profile image & name appear with his comment. I have checked that the settings for UM Disable Cache User Profile is set correctly. I have contacted WordPress and they enabled my ability to clear cache from my site and provided documentation for me to disable the cache for the Ultimate Member pages as directed in your Caching problems article under FAQs. Neither of these have resolved the issue. Any suggestions?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lmpierce

    (@lmpierce)

    I’m wondering if the issue lies more with the where the comments originated. The comments that do not show on the User Profile Comments tab are all ones posted to media attachments pages.

    Thread Starter lmpierce

    (@lmpierce)

    I have tested comments on other pages and they show up on the User Profile correctly. It is an issue with comments posted on media attachment pages. While the comments are visible on the media attachment pages themselves, they are not listed under the Comments tab on the UM User Profile. Any way to fix that?

    Plugin Support andrewshu

    (@andrewshu)

    Hello @lmpierce

    Sorry for the late answer. Try to use this code:

    remove_action( 'um_profile_content_comments', array( UM()->user_posts(), 'add_comments' ) );
    add_action( 'um_profile_content_comments', 'my_custom_add_comments' );
    function my_custom_add_comments() {
    	$comments = get_comments( array(
    		'number'        => 10,
    		'offset'        => 0,
    		'user_id'       => um_user( 'ID' ),
            'post_type'     => array('attachment', 'post', 'page'),
    		'type__not_in'  => apply_filters( 'um_excluded_comment_types', array('') ),
    	) );
    
    
    	$comments_count = get_comments( array(
    		'user_id'       => um_user( 'ID' ),
    		'post_type'     => array('attachment', 'post', 'page'),
    		'type__not_in'  => apply_filters( 'um_excluded_comment_types', array('') ),
    		'count'         => 1,
    	) );
    
    	UM()->get_template( 'profile/comments.php', '', array( 'comments' => $comments, 'count_comments' => $comments_count ), true );
    }

    Thank you.

    Plugin Support andrewshu

    (@andrewshu)

    Hi @lmpierce

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Comments on User Profile not showing’ is closed to new replies.