FEATURE Displaying the main author in the header
This commit is contained in:
parent
37656d8b05
commit
d91f7c46c8
|
|
@ -19,6 +19,7 @@ $citeReference = get_field('cite_reference', $post_id);
|
|||
|
||||
$likes_count = get_post_likes_count($post_id);
|
||||
|
||||
$authors = get_field('authors', $post_id);
|
||||
?>
|
||||
|
||||
<section class="post-header post-header--<?php echo $post_type; ?> ">
|
||||
|
|
@ -56,7 +57,11 @@ $likes_count = get_post_likes_count($post_id);
|
|||
<?php elseif ($post_type === 'articles') : ?>
|
||||
<h1 class="post-header__title"> <?php echo get_the_title(); ?></h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($authors && is_array($authors) && count($authors) > 0) : ?>
|
||||
<a class="post-header__main-author" href="<?php echo get_the_permalink($authors[0]->ID); ?>">
|
||||
<?php echo $authors[0]->post_title; ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="post-details">
|
||||
<?php if ($post_type === 'revues') : ?>
|
||||
<div class="revue-meta">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user