I have a site that displays fitness results to clients. It works by showing them a page based on their UID displaying unique charts and graphs etc.

I can redirect members to the unique pages on login, but I can't seem to add a menu item that also redirects them.

I need the menu item because currently, when clients log in and view their unique page; if they leave that page there's no navigation back to it.

Any ideas? Is this possible?

I'm a novice with code but I am learning, so please bear that in mind!


  • Anyone help with this?
    – Craig
    Mar 12, 2015 at 10:01

1 Answer 1


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:

 * Template Name: User Info

 //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.

  • That sounds great. Thanks for getting back to me. Where would I place that code?
    – Craig
    Mar 12, 2015 at 11:17
  • Updated the answer with more info about that.
    – jzatt
    Mar 12, 2015 at 11:32
  • Sounds great I'll give it a try today, thanks so much for taking the time the help, really appreciated
    – Craig
    Mar 12, 2015 at 12:50
  • Great. Don't forget to mark the answer as accepted if it works for you.
    – jzatt
    Mar 12, 2015 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.