Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $buffy .= '<span class="tdb-author-by">' . $this->get_att( 'author_by' ) . '</span> ';
- global $wp;
- $post_name = $wp->request;
- $post_id = $post_ids = get_posts(array
- (
- 'post_name' => $post_name,
- 'post_type' => $post_type,
- 'numberposts' => 1,
- 'fields' => 'ids'
- ));
- // var_dump($post_id);
- $coauths = get_coauthors($post_id[0].ID);
- 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 .= ' and ';
- }
- }
- }
- 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