I'm using author.php to display all user and their info. I would like to add a separate page like this : domain/users/user_name/ABOUT
Is there a way to add a page (ABOUT) and retrieve info of that user in that page ?
I'm using author.php to display all user and their info. I would like to add a separate page like this : domain/users/user_name/ABOUT
Is there a way to add a page (ABOUT) and retrieve info of that user in that page ?
Share Improve this question asked Nov 30, 2019 at 22:33 memsmems 7312 bronze badges 1- This may be possible with rewrite rule endpoints – Tom J Nowell ♦ Commented Dec 1, 2019 at 0:50
1 Answer
Reset to default 0Is there a reason why you don't just want to make the "author archive" a page and list them all on the page with a shortcode ? If that's an option, simply put your single author template in author.php
Author templates - Template hierarchy
If not, you could take your current template (that you've put in author.php) and move it to archive.php with a conditional tag, only showing your authors if the query is for post type authors .
Conditional tags - A post type
But any way you do it, I don't think you will get the permalink structure you're asking for:
domain/users/user_name/ABOUT
But rather : All users (using the archive page to list all authors): domain/archive.php Single user (or about-page): domain/author.php
If you instead were to use a simple page and a shortcode you could get: All authors: domain/users Single user: domain/author.php