Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    I now try this in metabox view with twig syntax

    {% set rating_settings = mb.rwmb_get_field_settings( 'apk_rating') %}
    {% set options = rating_settings['options'] %}
    
    <fieldset id='apk_rating'>
    {% for option in options %}
    <input type="radio"/> {{ option }}
    
    {% endfor %}
    </fieldset>

    Radios

    Could you please help me with syntax on how to set it selected ?

    Thank you
    Joie

    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Hello Peter

    Would you mind guiding me slowly

    I still do not get it how can i display it in front end. This is the custom field I created.
    APK Rating Custom Field

    On the custom post single I set a rating for example 4.5
    Entry in Custom Post

    Now what do i need to put in Metabox View so i can see all the radio buttons at front end ?
    I tried metabox view
    Metabox View

    I can only see 4.5 in the front end instead of radio buttons
    Only Value is displayed in the front end

    Thank you
    joie

    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Any Idea on this? Does that mean the custom field type we create can only be seen when we edit the custom post type ? But not from Builder GUI ?

    Thank you

    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Yes i see the icon, thank you very much !

    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Hello Peter thank you for your links, I have created the captcha following your links.
    Added the secret key and site key.

    Do i need to see additional fields like I am not a robot tick ?
    Because there seem nothing changes at front end?

    Thank you
    Joie

    in reply to: WP All Import Export #37570
    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Hello,

    Is metabox compatible with WP All Import/Export to export custom user fields ?

    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Thank you Andrea.

    Will try that!.

    Is that action hook also called when logged in user updating their profile ?

    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Andrea

    What is awr_user_has_role function ?

    in reply to: ℹ️Reopen a topic about Add-on of WP All Import/Export #35593
    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    I am looking to export user custom field too using wp-all export

    in reply to: How to add font end image replace for avatar #35545
    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Hello Long,

    i am using view to display the custom avatar
    [mbv name="user-avatar"]

    the template is

    {% for item in user.custom_avatar %}
    	<img src="{{ item.large.url }}" width="{{ item.large.width }}" height="{{ item.large.height }}" alt="{{ item.large.alt }}" />
    {% endfor %}

    Users uploads all sort of image dimensions.
    If possible, could you please what should i use to format the display of the custom avatar to 512px x 512px ?

    Thank you
    Joie

    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Hello please ignore the above request to use wp-login.
    I think i will use [mb_user_profile_register] shortcode.

    Another question below,

    I have custom user field group "user_kontak" consists of theses fields:
    custom "user_kontak_whatsapp",
    default "user_email",
    custom "user_kontak_street"

    I tried : [mb_user_profile_register id="user_kontak"]
    here what displayed, the email is displayed twice.
    https://cln.sh/38xaA0

    out of that "user_kontak" field group I just want to use only user_kontak_whatsapp in addtion to the defaul user field registration form

    So ideally my registration form will look like :

    Email
    Password
    Confirm password
    Whatsapp

    Do i need to create a separate field group just to contain the one same field id "user_kontak_whatsapp" ?

    Thank you
    Joie

    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    What if i want the custom field phone to display in the default WordPress registration form at wp-login, Is that possible ?
    Do i need to add php snippet for that

    I mean without using a new registration page

    Thank you
    Joie

    in reply to: How to add font end image replace for avatar #35290
    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    OK i managed to display it on my-account by putting this code into the MB View

    {% for item in user.custom_avatar %}
    	<img src="{{ item.large.url }}" width="{{ item.large.width }}" height="{{ item.large.height }}" alt="{{ item.large.alt }}">
    {% endfor %}

    Now i want to replace the gravar with this custom avatar uploaded
    Now i use the following snippet. Is this correct ?

    Is the value returned from image upload an array instead of single image?

    /** metabox custom avatar to replace WordPress gravatar */
    
    add_filter( 'get_avatar_url', 'mbua_get_avatar_url', 10, 3 );
    
    function mbua_get_avatar_url( $url, $id_or_email, $args ) {
        if ( is_numeric( $id_or_email ) ) {
            $user_id = $id_or_email;
        } elseif ( is_string( $id_or_email ) && ( $user = get_user_by( 'email', $id_or_email ) ) ) {
            $user_id = $user->ID;
        } elseif ( is_object( $id_or_email ) && ! empty( $id_or_email->user_id ) ) {
            $user_id = (int) $id_or_email->user_id;
        }
    
        if ( empty( $user_id ) ) {
            return $url;
        }
    
        $array_avatar = rwmb_meta( 'custom_avatar', [ 'object_type' => 'user', array( 'limit' => 1 ) ], $user_id );
    
        if ( ! $array_avatar ) {
            return $url;
        }
    
    	$custom_avatar = reset( $array_avatar );
        $url = $custom_avatar['full_url'];
    
        return $url;
    }
    in reply to: How to add font end image replace for avatar #35289
    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Hello
    I followed the https://metabox.io/create-custom-avatar/
    Then i changed from type Single Image to Image Upload

    https://cln.sh/KdEPVI

    Here is the video

    https://cln.sh/qUD0wW

    I cannot get it working to display on my-account page

    I am looking at documentation you provide at
    https://docs.metabox.io/fields/image-upload/#template-usage

    What code should i put in the View ?
    I tried to put this code into view Template

    $images = rwmb_meta( 'info', array( 'limit' => 1 ) );
    $image = reset( $images );
    ?>
    <img src="<?php echo $image['url']; ?>">

    Thank you
    Joie

    joie.hadi.nata.tan@gmail.com[email protected]
    Participant

    Hello Thank you for your help.

    I added the shortcode,
    But my field is not styled correctly

    https://cln.sh/HmwGxb

    Url is : https://boost.my.id

    Could you please help so that :
    1. The text 62 is not wrapped
    2. The text below the whatsapp field is smaller

    Thank you
    Joie

Viewing 15 posts - 1 through 15 (of 15 total)