Support » Fixing WordPress » Exclude some authors from a query

  • Hello there.
    I am looking for a solution, how to make this code work by excluding some authors from it.

    <?php $recent = new WP_Query("showposts=4&orderby=rand"); while($recent->have_posts()) : $recent->the_post();?>

    Like not to show posts from author 4 or 19 or 35.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • I forgot to mention that there is a way to exclude one author. But how about many?

    My final goal is to create a loop, that checks whether an author has a meta tag enabled. If is enabled, then he will be excluded from the randomness. I do not know how to do this, but I think my question is something that i can start my research on it.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude some authors from a query’ is closed to new replies.