Create custom author page
-
Hi everyone,
I am building a website that has many guest authors, but there is only one admin account that publishes it all.
Instead of creating multiple accounts, which would be impractical due to the high number of authors, I added a custom field called guest authors to every post and I managed to displayed it dinamically in the frontend.
Later, to change the author in the WordPress panel to show the guest author’s name, I added this to my functions.php:
add_filter( 'the_author', 'guest_author_name' ); add_filter( 'get_the_author_display_name', 'guest_author_name' ); function guest_author_name( $name ) { global $post; $author = get_post_meta( $post->ID, 'guest-author', true ); if ( $author ) $name = $author; return $name; }
But the problem is that there is not an individual page for each of the guest authors. Is there a way to create via php an author page for each guest author, automatically?
Thanks a lot!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Create custom author page’ is closed to new replies.