WordPress.org

Forums

User Taxonomies
Life saver!!! (1 post)

  1. Tahir Yasin
    Member
    Posted 1 year 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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • User Taxonomies
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.