Support Forum » User Profile

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: Getting subfield of "post" field type #47422
    sandrinerodriguessandrinerodrigues
    Participant

    Thank you Peter, I made it work.

    And for the WordPress function, I found the solution, of course it was not related to Metabox.
    Regards,
    Sandrine

    in reply to: User custom fields not showing in author page #47409
    sandrinerodriguessandrinerodrigues
    Participant

    Thanks a lot Peter, I learned this new function, get_queried_object_id, that will help a lot in the future !

    So I made this view working.

    There is only one thing with another view. On the same page, I am calling a cloned field.

    > 'instrument_de_musique' is a Group
    >> 'instrument' and 'niveau' are the two sub-fields (select) of this cloneable group.

    Following the same logic, I used the queried object but I don't know how to use it as the clones :

    {% set user_id = mb.get_queried_object_id() %}
    {% for clone in mb.rwmb_meta( 'instrument_de_musique', {object_type: 'user'}, user_id ) %}
    	{{ mb.rwmb_meta( 'instrument', {object_type: 'user'}, clone ) }} - {{ mb.rwmb_meta( 'niveau', {object_type: 'user'}, clone )}}
    {% endfor %}

    Nothing is displayed. Is rwmb_meta the correct function ? Which arguments should I give ?

    in reply to: User custom fields not showing in author page #47362
    sandrinerodriguessandrinerodrigues
    Participant

    Thank you Peter for clarifying that. But there is still a problem : I would like to see every user profile, not only my profile, when I'm connected.

    And I am not sure if I understood well :

    the user "john" is connected and can edit his profile with MB edit profile, which works fine.
    John should have access to his profile on front end /author/john, but also every other profiles of registered people.
    Every other connected user should see /author/john.

    So I understand "other users are not the author of the template ", but when you call "current user id" it will call the connected user and not retrieve the other users data ?

    Is there a way to achieve what I need ? I am really thinking about creating a CPT dedicated to the profile user, don't you think it would work better ? (Even if I found more elegant to use User Profile MB features, I am stuck since too many days on this...)

    Thank you,

    in reply to: User custom fields not showing in author page #47309
    sandrinerodriguessandrinerodrigues
    Participant

    Thank you Peter,

    yes the users do have the value in the custom fields...

    See on this screenshot : https://prnt.sc/G6cJjaeCtguq - You can see the user account backend, the empty one frontend, and the MB view which is called by a shortcode (working, since the text in the view is displayed)

    The field is filled in the back office user profile, and also on the edit user profile page.
    It doesn't appear frontend...

    in reply to: New field type request (phone number) #43011
    sandrinerodriguessandrinerodrigues
    Participant

    Hello Long,

    I am jumping on this thread too...

    Did the type "tel" disappeared from the Metabox Builder ? I can't find it under HTML5.

    And I can't see any pattern option in the text field ?

    Did anything change in the new version of Metabox AIO ?

    Thank you,
    Sandrine

    in reply to: Bug report : Fatal error when editing in MB Builder #43000
    sandrinerodriguessandrinerodrigues
    Participant

    I asked for help on the facebook group, and I finally found what caused the crash : the callback function.

    I deactivated it, and my back-office is back with Metabox AIO.

    You can close the ticket !

    Regards,
    Sandrine Rodrigues

    sandrinerodriguessandrinerodrigues
    Participant

    OK thank you, that's working fine !

    sandrinerodriguessandrinerodrigues
    Participant

    Thank you for your reply,
    I can effectively manage to add the value in the admin area.

    My concern is if I can access this values when I set a Custom Field in a Custom Post Type as a "Select" > in the options I don't want to enter the values manually, but access to the options set by the client in the admin area.

    Is that possible, do you have any documentation on this subject ?
    Thanks

    in reply to: Fatal error Meta Box AIO. #39755
    sandrinerodriguessandrinerodrigues
    Participant

    Thank you @peter, it works !

    in reply to: Fatal error Meta Box AIO. #39742
    sandrinerodriguessandrinerodrigues
    Participant

    I'm following the topic, having exactly the same error.

    I updated this morning to the last version of metabox AIO.

    The fatal error occurs when creating new post type, or new taxonomy. Creating customs fields is ok.

    Thanks !

    WordPress version 6.1.1
    Thème actif : Twenty Twenty-One (version 1.7)
    Extension actuelle : Meta Box AIO (version 1.16.7)
    PHP version 7.4.33

    Détails de l’erreur
    ======================
    Une erreur de type E_ERROR a été causée dans la ligne 111 du fichier /home/mnjl3489/2022/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-custom-post-type/src/Edit.php. Message d’erreur : Uncaught Error: Class 'RWMB_Update_Option' not found in /home/mnjl3489/2022/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-custom-post-type/src/Edit.php:111
    Stack trace:
    #0 /home/mnjl3489/2022/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-custom-post-type/src/Edit.php(24): MBCPT\Edit->is_premium_user()
    #1 /home/mnjl3489/2022/wp-includes/class-wp-hook.php(310): MBCPT\Edit->register_upgrade_meta_box('mb-post-type')
    #2 /home/mnjl3489/2022/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #3 /home/mnjl3489/2022/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 /home/mnjl3489/2022/wp-admin/includes/meta-boxes.php(1599): do_action('add_meta_boxes', 'mb-post-type', Object(WP_Post))
    #5 /home/mnjl3489/2022/wp-admin/edit-form-advanced.php(271): register_and_do_post_meta_boxes(Object(WP_Post))
    #6 /home/mnjl3489/2022/wp-admin/post-new.php(75): require('/home/mnjl3489/...')
    #7 {main}
    thrown

    in reply to: MB Setting Page param are not rendered in MB views #32476
    sandrinerodriguessandrinerodrigues
    Participant

    Thank you very much, I didn't get that !
    It works fine now 🙂

    in reply to: MB Setting Page param are not rendered in MB views #32462
    sandrinerodriguessandrinerodrigues
    Participant

    Thank you for your reply, here are the differents things :

    php code for setting page :

    <?php
    add_filter( 'mb_settings_pages', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $settings_pages ) {
        $settings_pages[] = [
            'menu_title' => __( 'Infos Maman Blues', 'your-text-domain' ),
            'position'   => 2,
            'capability' => 'edit_posts',
            'icon_url'   => 'dashicons-admin-generic',
        ];
    
        return $settings_pages;
    }

    Code for custom fields

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'          => __( 'Adresse postale', 'your-text-domain' ),
            'id'             => 'informations-de-contact',
            'settings_pages' => ['param-maman-blues'],
            'fields'         => [
                [
                    'name' => __( 'Nom du contact', 'your-text-domain' ),
                    'id'   => $prefix . 'nom_du_contact',
                    'type' => 'text',
                ],
                [
                    'name' => __( 'Rue', 'your-text-domain' ),
                    'id'   => $prefix . 'adresse_postale',
                    'type' => 'text',
                ],
                [
                    'name' => __( 'Code postal / Ville', 'your-text-domain' ),
                    'id'   => $prefix . 'code_postal_ville',
                    'type' => 'text',
                ],
            ],
        ];
    
        return $meta_boxes;
    }

    The MB Views Code :

    <div>
        <b>Nom du site : {{ site.title }}</b><br>
        {{ post.title }}<br>
        {% set group = attribute( site, 'param-maman-blues' ) %}
    {{ group.nom_du_contact }}
        {% set group = attribute( site, 'param-maman-blues' ) %}
    <img src="{{ group.logo_site.medium.url }}" width="{{ group.logo_site.medium.width }}" height="{{ group.logo_site.medium.height }}" alt="{{ group.logo_site.medium.alt }}">
        
    </div>

    Rendered in this page : https://www.preprod.maman-blues.fr/test-metabox/

    Do you have everything you need ?

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