Custom Fields
Re-Envisioned
Support MB User Meta Sometimes user meta are not saved

  • Creator
    Topic
  • #6965
    ludovic.meyer
    Participant

    Hello,

    I have a problem with MB User meta.
    Sometimes, the meta just does not save.

    Look the screencast : https://screencast-o-matic.com/watch/cbQIXiI2S0

    My code is below,

    
    <?php
    
    add_action( 'rwmb_meta_boxes', 'vm_user_meta_boxes' );
    function vm_user_meta_boxes( $meta_boxes )
    {
        $meta_boxes[] = array(
            'title'      => __( 'Options', 'vm' ),
            'type' => 'user',
            'fields' => array(
                array(
                    'name'    => __( 'Structure culturelle', 'vm' ),
                    'id'      => 'vm_cultural_structure',
                    'type'    => 'post',
                    'post_type'    => 'cultural_structure',
                    'desc'    => 'Structure culturelle associée à l\'utilisateur',
                    'query_args' => array(
                        'post_status' => 'all',
                    ),
                ),
            ),
        );
    
        return $meta_boxes;
    }
    

    Do you have an idea ?

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #6987
    Anh Tran
    Keymaster

    Strange, I’ve just tested with your code and it works. Do you have any “check” code that runs along with (maybe before) the code for Meta Box?

Viewing 1 replies (of 1 total)
  • The topic ‘Sometimes user meta are not saved’ is closed to new replies.