WordPress.org

Ready to get started?Download WordPress

Forums

User Taxonomies
Life saver!!! (1 post)

5 stars
  1. Tahir Yasin
    Member
    Posted 8 months ago #

    Really nice plugin! I modified it a little bit to accommodate multiple selection.

    1. Replaced the radiobutton field with following checkbox as shown below

    <input type="checkbox" name="<?php echo $key ?>[]" id="<?php echo "{$key}-{$term->slug}" ?>" value="<?php echo $term->slug ?>" <?php checked(true, is_object_in_term($user->ID, $key, $term)) ?> />

    2. Updated save_profile function as shown below

    $terms = (array) $_POST[$key];
    wp_set_object_terms($user_id, $terms, $key, false);

    I love this plugin!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.