fix: remove duplicate author display logic
Removed redundant fallback to `the_author()` when displaying article authors. The authors are already sourced from post meta, ensuring accurate and consistent author data presentation. Streamlined code for better readability and maintainability.
This commit is contained in:
parent
9e7dc2c85c
commit
a5bcb0342b
1 changed files with 1 additions and 2 deletions
|
@ -11,8 +11,6 @@
|
|||
$authors = get_post_meta(get_the_ID(), 'article_authors', true);
|
||||
if (!empty($authors)) {
|
||||
echo implode('; ', array_map('esc_html', $authors));
|
||||
} else {
|
||||
the_author();
|
||||
}
|
||||
?>
|
||||
<p class="text-muted">
|
||||
|
@ -29,6 +27,7 @@
|
|||
<?php if (has_excerpt()) : ?>
|
||||
<p class="text-muted"><strong>Abstract:</strong> <?php echo get_the_excerpt(); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$attachment_id = get_post_meta(get_the_ID(), 'article_attachment_id', true);
|
||||
$attachment_url = $attachment_id ? esc_url(home_url('/download/' . $attachment_id)) : '';
|
||||
|
|
Loading…
Reference in a new issue