Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //$show_stars_on_review - not used
- function get_author() {
- $buffy = '';
- $post_cat = get_the_category();
- $excl_cat = array("CATEGORY1", "CATEGORY2", "CATEGORY3", "CATEGORY3");// change example categories to post categories that shouldn't display the author name
- if (td_util::get_option('tds_p_show_author_name') != 'hide' && !in_array($post_cat[0]->cat_name, $excl_cat)) {// this checks if the category of the post is equal to one of the categories stored in array $excl_cat in line above
- $buffy .= '<div class="td-post-author-name">' . __td('By') . ' ';
- $buffy .= '<a itemprop="author" href="' . get_author_posts_url($this->post->post_author) . '">' . get_the_author_meta('display_name', $this->post->post_author) . '</a>' ;
- if (td_util::get_option('tds_p_show_author_name') != 'hide' and td_util::get_option('tds_p_show_date') != 'hide') {
- $buffy .= ' - ';
- }
- $buffy .= '</div>';
- }
- return $buffy;
- }
Advertisement
Add Comment
Please, Sign In to add comment