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

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -