arrays - Wordpress Query parsing only author ids -
i need array author ids loop, each 1 once if possible , out of posts in loop. suggestions? regards
following code helpfull you.
if(have_posts()){ $author_arr = array(); while(have_posts()){ the_post(); global $post; if(!in_array($post->post_author,$author_arr)){ $author_arr[] = $post->post_author; } } }
Comments
Post a Comment