SuitePlugins
Forum Replies Created
-
Try this instead
//add columns to User panel list page function add_user_columns($column) { $column['tema_interes'] = 'Tema de Interés'; return $column; } add_filter( 'manage_users_columns', 'add_user_columns' ); //add the data function add_user_column_data( $val, $column_name, $user_id ) { um_fetch_user( $user_id ); switch ($column_name) { case 'tema_interes' : echo um_filtered_value('ep_interes'); break; default: echo null; } return; } add_filter( 'manage_users_custom_column', 'add_user_column_data', 10, 3 );What you are looking for is
um_filtered_valueYou can use it like this.
um_fetch_user( get_current_user_id() ); echo um_filtered_value('grade');If you are looking to get the raw data without any special formatting, you can use get_user_meta
echo get_user_meta(get_current_user_id(), 'grade', true);I hope this helps. If it does, don’t forget to hit Solved.
Are you using the correct form here? There are 3 types of forms; Login, Profile and Register.
When you are logged in and you view a register a form, that is the message you will get.
Instead of going to a different page, have you tried hiding the UM Login when a user is logged in and load something else? That way user’s won’t see the same shortcode on that screen.
There are also options for redirecting after login https://ultimatemember.com/redirect-users-logging-wordpress/
Forum: Plugins
In reply to: [UM User Switching] Unable to activate pluginPlease give it a try now and let me know.
Forum: Plugins
In reply to: [UM User Switching] Unable to activate pluginThanks for mentioning this. I will fix immediately.
I don’t see any hooks here but what I would recommend is maybe giving each paid member a specific role. That way you can style the class ‘um-role-PAIDROLE’
Other than that, I can only suggest adding the members-grid.php to your theme and add dynamic class to the grids.
The plugin stores the users into the default WordPress user table so all users registered users through Ultimate Member ends up in the same place.
So, if you have a post on your site with comments enabled. You can add a comment and it SHOULD show up on the tab. I can confirm this for you later.
If I understand this correctly, those tabs are for displaying posts and comments that you are an author of.
The meta key is hide_in_members. The options/values to save are Yes and No
For whatever reason they are saved as an array in Ultimate Member so you may want to update user meta like this
array( 'No' )Hi @nibblers,
You can use the script below to get the first solution done. All you have to is change the meta_key to the meta key for regions and update the choices to some thing like
1;North
2;SouthThe solution should work but there would be a bit more of code needed to get the region on the profile page to display North instead of 1. I can put together a blog post or gist on how to get this more universal so you don’t have to set a manual each time you need to do some thing like this.
function example_um_select_dropdown_dynamic_options_callback( $options, $data = array() ) { $region_meta_key = 'region_select_1'; if ( $region_meta_key != $data['metakey'] ) { return $options; } if ( ! empty( $options ) ) { $new_options = array(); foreach( $options as $option ) { list ($k,$v) = explode( ';', $option ); $new_options[$k] = $v; } $options = $new_options; } return $options; } add_filter( 'um_select_dropdown_dynamic_options', 'example_um_select_dropdown_dynamic_options_callback', 12, 2 ); function example_um_select_options_pair_callback( $result = '', $data = array() ) { $region_meta_key = 'region_select_1'; if ( $region_meta_key == $data['metakey'] ) { return true; } return $result; } add_filter( 'um_select_options_pair', 'example_um_select_options_pair_callback', 12, 2 );I don’t see what is wrong with setting it up this way. You can use MemberPress to handle registration and disable registration in Ultimate Member then add an access rule to the MemberPress profile page, so users who subscription is cancelled, refunded, failed etc will not be able to view profile until subscription is active.
Would that be a workable solution for you?
You can use this code to add the ID into the Profile and Account section
function um_display_user_id_callback() { echo um_user( 'ID' ); } add_action( 'um_after_profile_name_inline', 'um_display_user_id_callback' ); // Adds the ID next to name add_action( 'um_before_form', 'um_display_user_id_callback' ); // Above Account pageI can create a coded example on how to make this happen. I just have couple questions.
- How/where would you like this to appear? Do you want it added in the header below the name on profile? Do you want it displayed at the top of the account page?
- Do you want other users to see the ID or just the owner of the profile?