BuddyPress | How to merge the “setting” & “profile” pages into one page? [closed]
BuddyPress | How to merge the “setting” & “profile” pages into one page? [closed]
BuddyPress | How to merge the “setting” & “profile” pages into one page? [closed]
I think you need to check if the displayed user has that role, try replacing $user->ID with bp_displayed_user_id(): function my_setup_nav() { if ( user_can( bp_displayed_user_id(), ‘store_owner’ ) ) { // … rest of your code } }
In the fairly recent past, WordPress changed how the password change works. It looks as though you can’t set your own password; but in fact you still can: Click on “Generate Password,” and then, when the automatically generated gobbledygook password comes up, simply edit that field to type in your desired password.
Add custom fields to the user profile
The old user registration form is not compatible with the new one due to the new multi site user roles introduced. While it does involve an extra step the new users profile can be edited once the user is created. There are also plugins available that extend the add new user options. Gravity Forms has … Read more
That´s just a quick sketch. You´ll have to search up the functions yourself and complete the code: // don´t add on front page if ( ! is_admin() ) return; // Get user data get_currentuserinfo(); global $current_user; // Search what keys you need to be filled echo ‘<pre>’; print_r( $current_user ); echo ‘</pre>’; // Check the … Read more
It works on a standard profile page (your profile / Profile) without other plugins installed. Other plugins may affect the overall result. I think code can be improved, if some one knows how please give it a go. function better_profile_page($buffer) { global $pagenow; if ($pagenow == ‘profile.php’ || $pagenow == ‘users.php’ || $pagenow == ‘user-edit.php’) … Read more
Create an endpoint for EP_ROOT named profile. In your callback handler use get_user_by( ‘slug’, get_query_var( ‘profile’ ) ) to find the user data. Create a template file profile.php and use locate_template( ‘profile.php’, TRUE ) to load it. In your template show the user data.
WordPress has the function edit_post_link() to Displays a link to edit the current post, if a user is logged in and allowed to edit the post.
The problem is with the AJAX endpoint URL, i.e. url: userimg.ajax_url, which is not actually defined in your JS/PHP code. More specifically, you did define the correct URL, but in the JS object, the property name is ajaxurl and not ajax_url: // wrapped for brevity wp_localize_script( ‘ajax-account’, ‘userimg’, array( ‘ajaxurl’ => admin_url( ‘admin-ajax.php’, ‘relataive’ ) … Read more