Skip to content

Commit

Permalink
removed - Fallback to Yoast SEO's user bio if the custom bio is not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveJonesDev committed Jun 25, 2024
1 parent 4870f23 commit 32d3078
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions author.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@
?>
</h2>
<?php
echo wp_kses_post( wpautop( $idf['custom_author_bio'][0] ) );
if ( isset( $idf['custom_author_bio'][0] ) ) {
echo wp_kses_post( wpautop( $idf['custom_author_bio'][0] ) );
}

$author_bio = get_the_author_meta( 'description' );

Expand All @@ -220,16 +222,7 @@
</div>
<?php

} else {
// Fallback to Yoast SEO's user bio if the custom bio is not set.
$yoast_user_bio = get_the_author_meta( 'wpseo_metadesc' );

// Check if Yoast's user bio exists and is not empty.
if ( ! empty( $yoast_user_bio ) ) {
echo wp_kses_post( wpautop( $yoast_user_bio ) );
}
}

?>
</div>
</div>
Expand Down

0 comments on commit 32d3078

Please sign in to comment.