Can we get user profile page using user_id in the URL?

You can use the get_the_author_meta() function for this purpose. Use the get_the_author_meta(‘ID’) for only get the ID. Ensure you check the page first with is_author() function before getting the ID. https://developer.wordpress.org/reference/functions/get_the_author_meta/ https://developer.wordpress.org/reference/functions/is_author/

User profile in front-end

You need to do 2 different things to achieve this. URL Structure: Getting the URL in your desired format: http://website.com/user/username By default, user’s archive URL is something like this http://website.com/author/username There is a plugin to change author slug, install this plugin and set the slug to user Plugin: https://wordpress.org/plugins/rename-author-slug/ [Note: I’m the author of this … Read more

Adding profile data to database

To show extra fields in profile, use this hook: function myplugin_show_profile_extra_fields( $user ) { // echo your extra fields here } add_action( ‘show_user_profile’, ‘myplugin_show_profile_extra_fields’ ); add_action( ‘edit_user_profile’, ‘myplugin_show_profile_extra_fields’ ); And to save extra fields use following hook: function myplugin_save_profile_extra_fields( $user_id ) { if ( !current_user_can( ‘edit_user’, $user_id ) ) { return false; } update_usermeta( $user_id, … Read more

How to create a profile page for users?

Try this, its work for me add your functions.php add_action(‘init’, function(){ global $wp_rewrite; $wp_rewrite->author_base=”profile”; $wp_rewrite->flush_rules(); }); and create author.php in your theme directory. example; <?php $author = get_user_by(‘slug’, get_query_var(‘author_name’)); echo ‘<pre>’; var_dump($author);