Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global $wp;
- $url = $wp->request;
- $postid = url_to_postid( $url );
- $coauths = get_coauthors($postid);
- if (count($coauths) > 1) {
- foreach ($coauths as $key => $coauth) {
- $buffy .= '<a class="tdb-author-name " href="/author/' . $coauth->user_nicename . '">'. $coauth->display_name . '</a>';
- if (($key + 1) != count($coauths)) {
- $buffy .= '<span class="tdb-author-and">and </span>';
- }
- }
- }
- else {
- $buffy .= '<a class="tdb-author-name" href="' . $post_author_data['author_url'] . '">' . $post_author_data['author_name'] . '</a>';
- };
Advertisement
Add Comment
Please, Sign In to add comment