Archived topic
Show author page even if there are no posts
9 replies · Started by Sara on May 13, 2020
GeneratePress does not seem to show the author page if the author has no posts (I get a 'nothing found' message). How can I change that so all my authors have a page even if they haven't written anything yet?
Thanks in advance!
Hi there,
you will probably to create a custom author template, as GP only lists authors as an archive. This is a good article for creating the template:
https://www.wpbeginner.com/wp-themes/how-to-add-a-custom-author-profile-page-to-your-wordpress/
Ok, sounds good.
Where can I find the current code that displays the author's name and bio so I can copy it into the author template? It doesn't seem to be in archive.php.
In the wpbeginner article scroll down to "Method 2. Manually Create a Custom Author Profile Page in Your Theme" - they provide all that good stuff :) Let us know if you need some specific that they dont provide.
I saw that, but I really like the layout that I've got right now (the general archives layout) and would like to duplicate it for the custom author page (which would be easier if I could just copy that code). But if that's not possible I will figure it out myself. Thanks.
Hi there,
This function is responsible for that section: https://github.com/tomusborne/generatepress/blob/2.4.2/inc/structure/archives.php#L19-L52
Let me know if you need more info :)
This is perfect. Thanks so much Tom (and also David!)
One last question, if I create an author.php page do I need to do it in a child theme? Or is it ok to create it within the GeneratePress theme?
It needs to go in a Child Theme.
Got it. Thanks.
You're welcome