yuriinalivaiko
Forum Replies Created
-
Hi machinette,
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??
Regards
Hi emenel,
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??
Regards
Hi @federicods
Please clarify why this code does not work:
- This code is not executed at all.
- The code is executed but does not affect the result.
Please verify that you entered the keyword into the filter ‘comune_professionista’ in the member directory filters area and its value is sent to the server in the AJAX request that gets members.
Regards
Hi, @desben
So, the problem is related to icons in the profile header, not icons in the social fields?
The background color issue for the icons in the profile header will be fixed in the next release. As a temporary solution you can download the fixed version from the
development/2.5.5
branch in the Ultimate Member repository on GitHub.Regards
Hello @federicods
I see several problems in your code:
- PHP errors. Please use proper quotes.
- There is no
'search'
key in the$args
parameter. Use a filter input value from the global$_POST
variable. - You have to check that the filter is active. Don’t add filter rules for inactive filters.
- You have to remove predefined rules for the filter before adding your custom rules.
See example:
add_filter( 'um_prepare_user_query_args', 'custom_um_prepare_user_query_args', 10, 2 ); function custom_um_prepare_user_query_args( $args, $directory_settings ) { // check that the filter is active. if ( ! empty( $_POST['comune_professionista'] ) ) { // remove predefined filter rules. foreach ( $args['meta_query'] as $i => $filter_l1 ) { if ( ! is_array( $filter_l1 ) ) { continue; } if ( isset( $filter_l1['key'] ) && 'comune_professionista' === $filter_l1['key'] ) { unset( $args['meta_query'][ $i ] ); continue; } else { foreach ( $filter_l1 as $filter_l2 ) { if ( is_array( $filter_l2 ) && isset( $filter_l2['key'] ) && 'comune_professionista' === $filter_l2['key'] ) { unset( $args['meta_query'][ $i ] ); } } } } // add custom filter rules. $filter_value = sanitize_text_field( wp_unslash( $_POST['comune_professionista'] ) ); $args['meta_query'][] = array( 'relation' => 'OR', array( 'key' => 'comune_professionista', 'value' => $filter_value, 'compare' => 'LIKE' ), array( 'key' => 'comune_professionista_47', 'value' => $filter_value, 'compare' => 'LIKE' ), array( 'key' => 'comune_professionista_47_63', 'value' => $filter_value, 'compare' => 'LIKE' ) ); } return $args; }
Regards
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??
Regards
Hi @prytkova
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??
Regards
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??
Regards
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??
Regards
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??
Regards
Hello @xxaimsxx ,
You can not use this solution to make the Role column sortable because the
'role'
usermeta doesn’t exist. WordPress stores user’s roles in the'wp_capabilities'
usermeta. The value of this usermeta is an array because users may have multiple roles. So, this usermeta can not be used for sorting.You need a workaround to sort users by their primary role:
- add a code that writes a primary user role to the custom usermeta as a simple string when the user’s roles are changed.
- add a column that displays the custom usermeta with the primary user role to the Users table.
- make this custom column sortable.
Just an advice: Try to use role filtering instead of role sorting. You can use links above the table to display users who have a certain role.
Regards
Hi @tomberwolf,
You can add the Twitter (twitter) field to the profile form, this is a predefined field. We can not modify this field like you want.
You need to write a custom PHP code that adds the “twitter” usermeta with a proper URL once the user is added via the social registration plugin you use. Try to find a proper hook in the social registration plugin or use the native WordPress hook user_register.
Regards
Hi @ncapehorn
You can configure different redirects after login for Subscriber and administrator. Each user role uses its own permissions and settings. Set role priority if users on your site have multiple roles.
Note: You can use the “Redirection after Login” option in the login form settings to set the redirect rule for the form. But in your case it’s better to disable this option (set to “Default”) to use redirect settings from roles.
Go to wp-admin > Ultimate Member > User Roles > Edit Role (for Subscriber). Scroll down to see the “Login Options” box.
Select the “Redirect to profile” option in the “Action to be taken after login” setting, then click the “Update Role” button to save changes. The plugin will redirect subscribers to their profiles after logging via the Ultimate Member login form.
Select the “Redirect to URL” option if you need to set a custom redirect URL e.g. the forum page.
Regards
Please verify role settings for the user who can not access the Home page after login. Maybe this role doesn’t have permission to view the homepage.
Go to wp-admin > Ultimate Member > User Roles > Edit Role and scroll down to see the “Homepage Options” box. Turn on the “Can view default homepage?” setting, then update the role settings.Hi @tedtang
Maybe the profile width is limited and never comes wider than 800px.
The profile width may be limited by the container width that depends on your theme.
The profile width may be limited by the “Profile Maximum Width” setting on wp-admin > Ultimate Member > Settings > Appearance > Profile. Try to set
100%
in this setting.Regards