Guest User

Untitled

a guest
Aug 14th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. global $wp;
  2. $url = $wp->request;
  3. $postid = url_to_postid( $url );
  4. $coauths = get_coauthors($postid);
  5. if (count($coauths) > 1) {
  6. foreach ($coauths as $key => $coauth) {
  7. $buffy .= '<a class="tdb-author-name " href="/author/' . $coauth->user_nicename . '">'. $coauth->display_name . '</a>';
  8. if (($key + 1) != count($coauths)) {
  9. $buffy .= '<span class="tdb-author-and">and </span>';
  10. }
  11. }
  12. }
  13. else {
  14. $buffy .= '<a class="tdb-author-name" href="' . $post_author_data['author_url'] . '">' . $post_author_data['author_name'] . '</a>';
  15. };
Advertisement
Add Comment
Please, Sign In to add comment