• Resolved chneijens

    (@chneijens)


    Hi,

    i’m trying to get this query_post to work

    query_posts( array( ‘post__in’ => array(8687, 8685)),’orderby=rand,showposts=1′ );

    i want to select 2 post with known id and randomly return one of the these posts.

    can someone help me.

    thanks

Viewing 1 replies (of 1 total)
  • Thread Starter chneijens

    (@chneijens)

    guys i found it. I’ll post the answer here, maybe someone else can use it too.

    query_posts(array(‘orderby’ => ‘rand’, ‘posts_per_page’ => 1,’post_type’=>’post’,’post__in’ => array(‘8687’, ‘8685’)));

Viewing 1 replies (of 1 total)
  • The topic ‘can't seem to get this simpel query to work’ is closed to new replies.