Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 91 through 105 (of 244 total)
  • Author
    Posts
  • in reply to: Registering a user with a relationship field #41042
    YasmineYasmine
    Participant

    Oh I see - it needed to be 'from'. Sorry about that.

    The only issue now is that is right at the bottom of the form in a position that does not make sense and does not have a title - so does not match how I formatted the rest of the form. How can I fix this?

    Thank you.

    in reply to: Registering a user with a relationship field #41041
    YasmineYasmine
    Participant

    And when I add it in the correct way that you suggest:

    '[mb_user_profile_register mb_frontend_form id="university_user_relationships_to"  label_submit="Add new" confirmation="Your academic has been added" role="contributor" show_if_user_can="create_users" email_as_username='true' email_confirmation="false" password_strength="false" ]'

    At the bottom, it does not link to selecting the university post. It just lets you select a different user - not university.

    I am unable to use pastebin to share a screenshot.

    in reply to: Registering a user with a relationship field #41040
    YasmineYasmine
    Participant

    Oh but I want to add the relationship field into the profile register. As it is a university, I want to attach the university via a relationship post when we register a new user..

    So in the first message, the code I shared was to add to edit this:

    function add_more_registration_fields($fields) {
            $first_fields = [ ...	
                [
    in reply to: Registering a user with a relationship field #41034
    YasmineYasmine
    Participant

    Hi Peter,

    Ok so that means I made it :

    [mb_frontend_form id="mb_user_profile_register,university_user_relationships_to"  label_submit="Add new" confirmation="Your academic has been added" role="contributor" show_if_user_can="create_users" email_as_username='true' email_confirmation="false" password_strength="false" ]

    But with this, all I get is a select already created user box. Whereas...

    [mb_user_profile_register label_submit="Add new" confirmation="Your academic has been added" role="contributor" show_if_user_can="create_users" email_as_username='true' email_confirmation="false" password_strength="false" ]

    Rendered the correct form and with all my added fields, which I added via a php snippet. Only the relationship not working.

    I removed the relationship field (that I shared in my last code) from the php snippet

    And I also tried _relationship_from - but in that case, nothing rendered.

    What am I now doing wrong?

    Many thanks,
    Yasmine

    in reply to: Registering a user with a relationship field #41014
    YasmineYasmine
    Participant

    university_user is the name of the relationship ID

    in reply to: Search 2 error #41011
    YasmineYasmine
    Participant

    Thanks, it was Relavanssi...

    I will try work out how to fix.

    in reply to: PHP User Error Log #40977
    YasmineYasmine
    Participant

    Great, thank you!

    in reply to: PHP User Error Log #40950
    YasmineYasmine
    Participant

    And I don't know how to reproduce. I can only see the issue in php_errorlog and do not know yet what issue it is reporting on

    in reply to: PHP User Error Log #40949
    YasmineYasmine
    Participant

    Sure, here are the logs from today: https://pastebin.com/cn0efYPN

    in reply to: Auto-generate featured image for post #40400
    YasmineYasmine
    Participant

    Thank you Peter! And sorry- I missed that you'd replied.

    Does your plugin Slim SEO support this feature?

    in reply to: How to roll back to earlier MB version #39882
    YasmineYasmine
    Participant

    Oh niceee, thank you for the suggestion 🙂

    in reply to: My code stopped working to get user ID of a user field #39849
    YasmineYasmine
    Participant

    Hi Peter,

    Its still not working. Do you know what else I can try?

    in reply to: My code stopped working to get user ID of a user field #39709
    YasmineYasmine
    Participant

    Hi Peter,

    I do not get anything with a print_r on a new template using a test post. But it is definitely the correct ID (with prefix included) and there is definitely a value in the test post to output. No error messages when trying to get the value.

    But I use elementor as my page builder, with the elementor dynamic conditions tool, I can successfully output the test post value. Does that use the rwmb_meta() ?

    I also checked in my code with a wp_mail(...sprintf()) and all the other fields had a value except this one and another number field where the value was also an integer.

    Many thanks,
    Yasmine

    in reply to: Adding a custom field as a link to an elementor button #39332
    YasmineYasmine
    Participant

    Hey - I never got it working with merging the mailto: in output. But I got it working by just getting the user email with the shortcode and then in the page builder when adding the shortcode link, click advanced and add "mailto:" beforehand 🙂

    in reply to: Outputting user data in group loop #39118
    YasmineYasmine
    Participant

    Update:
    Hi Peter,

    With the following code, I have got the avatar and photo to show within the metabox group on elementor. The first value correctly populates the name and avatar.

    //For display_name
    add_shortcode("former_team_member_get_name", function (){
    	global $post;
    $ftm_post_type = get_post_type($post->ID); 
    if(is_singular() && "team" == $ftm_post_type)
    {
    $group_id = rwmb_meta( 'archived_team_users_group','',$post->ID); 
    foreach ($group_id as $x){
    $f_user_id = $group_id['former_team_member'] ?? '';
    foreach ($f_user_id as $user){
    	$ff_user = get_usermeta($user);
    }
    		return sprintf($ff_user[1]);
    		}}});
    
    //For the avatar
    add_shortcode("former_team_member_get_avatar", function (){
    	global $post;
    $ftm_post_type = get_post_type($post->ID); 
    if(is_singular() && "team" == $ftm_post_type)
    {
    $group_id = rwmb_meta( 'archived_team_users_group','',$post->ID); 
    foreach ($group_id as $x){
    $f_user_id = $group_id['former_team_member'] ?? '';
    foreach ($f_user_id as $user){
    $profile_pic = get_avatar_url($user);
    $main_html_markup = "<img src='$profile_pic'>";
    }}
    return $main_html_markup;	
    
    		}});

    However, when I try to use the metabox group field within a template that has values, it shows as blank.

    How do I populate the metabox group correctly with shortcodes that then loop to show all the post values on a template?

Viewing 15 posts - 91 through 105 (of 244 total)