One solution would be to create a page with a page template that gets all info based on the user ID. Then you can add that page to the menu.
Something like this:
<?php
/*
* Template Name: User Info
*/
get_header();
//Your code for getting the users id
$user_id = '123';
//Output userinfo using your code
...
This code shold be saved as a file in your theme folder. Name it something like template-user.php
. Then when you create a new page in WordPress you can select this template as the page template.
To get your theme´s HTML structure easily, you can copy the content of your theme page.php
and add it to this file.
Related Posts:
- Get current user id in function php
- Create a global variable for use in all templates
- Can i check if user is doing any ajax request?
- How can I default to all WordPress roles when parameter is not included in shortcode?
- get_users(…) only returns one user
- Get users that likes the post
- Call to undefined function get_userdata() in plugin
- Use post ID in functions.php file adminside
- create front-end users post list by specific category
- php return username of currently viewed author profile
- Use of antispambot with $curauth->email
- Uses for function: wp_update_user
- Change wordpress’ database data using ajax – how to get current user id?
- Allow a user or role to view drafts and previews, but not other admin privileges?
- How to block specific user id in custom login form?
- Display current user metadata on WordPress page
- Add another role to a user when they click a button?
- is_user_logged_in() not working in homepage
- Can’t get_users info by using json_encode
- Matching multi user
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Get author meta of all writers
- Display a list of users with avatar filterable with alphabets
- Cross origin ajax request always returns 0 when calling get_current_user_id();
- Custom Admin Menu Report for Specific User ID
- Modify previous and next text from pagination links
- Add extra field to users
- Shortcode putting html such as
- What is the most efficient way to search users by their display name?
- Calling a method from functions.php on a click of a button
- How to redirect users to custom lostpassword page?
- How to change featured content to a different tag in WordPress Twenty Fourteen?
- Can I write ‘RewriteCond’ using ‘functions.php’?
- How do I create comment-reply-button using element not
- WordPress menu deletes when trying to add a hook
- Overriding a theme redux file in child theme
- Validate a users email address when using gmail to register
- Making Quote Plugin more efficient
- allow subscribers to see private posts without plug in
- remove wp floating submenu in wp dashboard
- ACF: how do I get the fields and its values of a specific group?
- Fatal error: Uncaught Error: Call to undefined function test()
- Return a numerical function value in Customizer controls
- How can I get the values of my WordPress $wpdb query in Jquery?
- Adding a widget function into the php theme file
- theme_root returning a truncated URI
- Call to undefined method – Download Monitor
- Echo string and function?
- How to change menu labels
- Adding wrapper elements in the_date() like in the_title()?
- How to obtain the current website URL in my theme?
- Notify users only on post publish
- Plugin Generate Unexpected output during activation
- Remove Custom Divs from AMP pages
- Read array in php?
- Is it possible to display a DIV to not logged in users and then change it for users who are logged in?
- PHP code for displaying WordPress posts in a static page not working
- Remove extract from function
- Undefined offset: 3 in custom function
- How to add data to a custom field at the wp_users table?
- How can I use custom menus with a Bootstrap WordPress theme?
- How to make a cookie be on the whole site instead of being on a specific page/
- Child Theme’s Read More Text
- call a string/function from database
- Get date function not working
- How to implement __() function in my theme’s php file?
- How a HTML form can trigger a PHP function?
- Proper way to remove html code on child theme
- Trying to add Custom Post Type to this functions.php command
- Apply function.php filter only if url not has /amp/
- Preventing direct access to a page in WordPress
- How to use data URL in WordPress?
- Flushing the slug base has no effect and does not change
- Display a custom name when the user has no name settle in his account
- Uploading/integrating custom user registration page
- Multiple cron jobs vs daily cron job doing multiple things? Which one yields better performance and scalability?
- Discount in the specific product title using keyword ( Woocoommerce )
- Modify post image in full size
- How to link all featured images to custom url in single.php for only non-logged-in users?
- JQuery modal not loading video on popup, only displaying it after multiple reopenings
- custom post type column countdown
- Creating wordpress user registration form
- Add missing alt tag to featured images for “storefront” theme
- Notice: Undefined index: post_title error
- Load admin bar without wp_head or wp_footer [duplicate]
- My query keeps looping infinitely ! how to stop it?
- Highlight Single Page Ancestor
- Registration form not registering First and Last name
- Removing get_template_part in child theme
- How to add button to top of theme customizer?
- ajax form function error
- Display custom meta box in my template file
- Simple Probléme in wordpress
- Options.php loop won’t show!
- Contact form with dynamic dropdown and filter
- Critical Error customiser
- How to lock users account until approvation
- WooCommerce: write featured image dimensions to custom fields in product’
- Generate and upload screenshot as featured image for user-submitted post
- transition_post_status hook, works – but not if the post is new