We currently have a setup where anyone can register as a user and their own ‘page’ gets created manually by admin. We need a menu option to be something like ‘View Your Page’ and direct a user to their own page. I can’t get my head around it as there is no current link between the user and the page that’s created manually…any thoughts?
Thanks.
I’ve answered a similar Question and the same code can be adapted for this case. This creates a Meta Box where you can assign a user to a specific post/page, and the information is stored as a Custom Field. The following can be put in
functions.php
or in a functionality plugin (see: Where to put my code: plugin or functions.php?):With that in place, you can do something like this in a theme template file to display the “User Page” link:
IF you name the pages with the username for example http://www.site.com/author-page/jhon_doe you can try something like this;
Try to use a unique field or ID to name the pages to make it work. See more of wp_get_current_user() to see all fields available