0

I may be using the word - 'Profile' wrong here, but after two hours of googling am left with zero results. So, the query is as follows -

We wanted to make a site where we can invite writers to write their post and be able to edit and post easily. We achieved that using combination of plugin and custom code. We went ahead and made a /profile page where the current logged-in user can see his posts, his details (username, email etc) and can view/edit his articles on front end.

Now the issue is - We want to give every registered user his own such profile which any other user can visit, read his 'about me' section, view his posts etc. In short, we want every user to have their own profile, something as /profile/userA

Do you have any approach that you can suggest or any tutorial you can refer?

  • 1
    You need to create an author.php template page – Pieter Goosen Oct 27 '14 at 10:28
  • @PieterGoosen But author.php will be same for everyone like /profile is right now. I believe, I'd need something like author-{nicename}.php and the problem is that the {nicename} should dynamically generate so that the code we are using in /profile can be used to display set of information of user. – vajrasar Oct 27 '14 at 10:35
  • 1
    If you click on a post author name, the user will be taken to a page which will display the author's post and info. Correct? This template will be author.php – Pieter Goosen Oct 27 '14 at 10:57
  • 1
    @PieterGoosen is right. Each author on WordPress has and archive page with a URL like yoursite.com/author/name/. You can work directly in author.php instead of working in a page template and you will have what you describe in the question. – cybmeta Oct 27 '14 at 11:09
  • Yes @PieterGoosen was absolutley correct. After further digging I found out that author.php was the way to go. – vajrasar Oct 27 '14 at 14:08
0

As mentioned by @PieterGoosen in the comments, all I had to do was shift my code to a custom author.php and the rest was solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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