Support Forum » User Profile

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Updating usermeta for a custom meta_key #15738
    MattMatt
    Participant

    That worked. Thank you!

    in reply to: Updating usermeta for a custom meta_key #15736
    MattMatt
    Participant

    Yes, I used the Builder add-on, and this is the code it gave me.

    add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
    function your_prefix_register_meta_boxes( $meta_boxes ) {
        $meta_boxes[] = array (
            'title' => 'Premium Categories',
            'id' => 'premium_categories',
            'autosave' => true,
            'fields' => array(
                array (
                    'id' => 'premium_categories',
                    'type' => 'taxonomy',
                    'name' => 'Sections',
                    'desc' => 'Choose which types of articles you want to appear in your custom feed.',
                    'taxonomy' => 'category',
                    'field_type' => 'select_advanced',
                    'multiple' => true,
                    'select_all_none' => true,
                ),
            ),
            'type' => 'user',
        );
        return $meta_boxes;
    }
Viewing 2 posts - 1 through 2 (of 2 total)