Fix custom author page sometimes not showing

Apparently, the ID alone does not always work for some reason.
This commit is contained in:
Tetrakern 2023-09-26 21:33:35 +02:00
parent 4ba763f4a2
commit ef38281200

View File

@ -144,8 +144,10 @@ $tabs[ $current_tab ]['classes'][] = '_current';
<section class="singular__content author-page__content content-section">
<?php
if ( $author_page ) {
setup_postdata( $author_page );
$post = get_post( $author_page );
setup_postdata( $post );
the_content();
wp_reset_postdata();
} elseif ( ! empty( $author->user_description ) ) {
echo $author->user_description;
}