Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed - Fallback to Yoast SEO's user bio if the custom bio is not set. #1244

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading