Skip to content

Commit

Permalink
Merge pull request #265 from dxw/ticket/author_name
Browse files Browse the repository at this point in the history
Don't check get_the_author()
  • Loading branch information
leedxw authored Nov 21, 2024
2 parents 9c6e72d + aace99d commit 3293053
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions lib/byline.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
function gds_byline()
{
?>
<span class="govuk-visually-hidden">Posted by: </span>
<?php
if (function_exists('coauthors_posts_links')) {
if (get_the_author()) {
coauthors_posts_links(', ');
}

} else {
?> <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')) ?>" rel="author" class="govuk-link"><?php echo get_the_author() ?></a> <?php
}
<span class="govuk-visually-hidden">Posted by: </span>
<?php
if (function_exists('coauthors_posts_links')) {
coauthors_posts_links(', ');
} else {
?> <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')) ?>" rel="author" class="govuk-link"><?php echo get_the_author() ?></a> <?php
}
}

0 comments on commit 3293053

Please sign in to comment.