- This topic has 4 replies, 2 voices, and was last updated 1 year, 5 months ago by .
-
Topic
-
I am using MB User Profile to have users submit their forms on the front end. This works with updating the default fields like first_name and description. However, it does not update metadata for custom fields. I want users to be able to select from a list of categories so I can show them custom content based on their interests.
If I add this, it will create/update usermeta for premium_categories when I save a profile in the admin area.
add_action( 'personal_options_update', 'save_premium_categories' ); add_action( 'edit_user_profile_update', 'save_premium_categories' ); function save_premium_categories( $user_id ){ if ( !current_user_can( 'edit_user', $user_id ) ) { return false; } update_usermeta( $user_id, 'premium_categories', $_POST['premium_categories'] ); }
However, it still does not update when I save on the front end. Any ideas how I can make this work?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.