Tag Info

Hot answers tagged

2

Here you go: function get_author_post_tags_wpa78489($author_id,$taxonomy = 'post_tag'){ //get author's posts $posts = get_posts(array( 'author' => $author_id, 'posts_per_page' => -1, 'fields' => 'ids' ) ); $ts = array(); //loop over the post and count the tags foreach ((array)$posts as ...


1

Double check that you don't have a check for has_excerpt() that's hiding the "auto-generated" excerpt. Even if get_the_excerpt() returns something made from post_content, has_excerpt() still returns false if the excerpt is empty. If that's not the case, see if there's a function that filters on get_the_excerpt that could be effecting this. To answer your ...


1

When you do the following in your code $posttags = get_the_tags($item->term_id);, $item is referring to a post object, not a term object. Therefore, term_id is an invalid property. This should be throwing a PHP notice. While not certain, I think what you are intending to do is: $posttags = get_the_tags($item->ID); since get_the_tags takes a post ...



Only top voted, non community-wiki answers of a minimum length are eligible