WordPress.org

Ready to get started?Download WordPress

Forums

Exclude some authors from a query (3 posts)

  1. Nikolas
    Member
    Posted 4 years ago #

    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

  2. Nikolas
    Member
    Posted 4 years ago #

    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.

  3. Nikolas
    Member
    Posted 4 years ago #

    anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.