Cannot set user passwords

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.

Custom style on profile options page

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

Custom user profile URLs

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.

AJAX action not triggering PHP function

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