This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

How to show BP Xprofile fields in user results – Part 2

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #47432
    TrinerTriner
    Participant

    Update for ticket https://wp-dreams.com/forums/topic/how-to-show-bp-xprofile-fields-in-user-results/

    Unfortunately the adjusted snippet did not help. With this snippet and with the plugin version 4.26.7 installed, the contents of the XProfile fields are still not displayed. So, I rolled back to version 4.26.2 again.

    May I ask you to take another look at this?

    #47449
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Can you add temporary FTP and back-end access? I can try to debug it if you want to.

    #47488
    TrinerTriner
    Participant

    You cannot access this content.

    #47515
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #47530
    TrinerTriner
    Participant

    Hi Ernest

    I just retested the credentials with Cyberduck and FileZilla. It should work. But you have to make sure, that you use port 21 and an unencrypted connection. If you use FileZilla you can force this parameters via the Site Manager.

    • This reply was modified 5 months, 3 weeks ago by Triner.
    #47557
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Thanks!

    I was using the IP address, that didn’t work, now it’s fine. I managed to find the problem and fixed it. This was a yet unknown issue, so I will make sure to fix it in the upcoming release.

    #47583
    TrinerTriner
    Participant

    Hmm, you’re right, it looks like the IP has changed. Sorry!
    Great news, thank you! Do I still need the custom snippet with the latest version of the plugin? If so, can I leave it as it is at the moment?

    add_filter('asp_user_advanced_field_value', 'asp_xprofile_user_advanced_field_value', 10, 3);
    function asp_xprofile_user_advanced_field_value($value, $field, $user) {
    	
    	if ( empty($value) ) {
            global $bp;
           
            $args = array(
    			'field'   => $field,
    			'user_id' => $user->id
    		);
    		$data = bp_get_profile_field_data($args);
    
    		if ( !empty($data) ) {
    			 var_dump($data);
    			return $data;
    		}
        }
        
        return $value;
    }
    #47584
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Yes – please keep that custom snippet, it should work from now on.

    #47585
    TrinerTriner
    Participant

    Alright, thank you.

    #47586
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are welcome.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.