Forums

Display posts by id, in a page (1 post)

  1. wwwdotcom
    Member
    Posted 4 months ago #

    it seems i can not find what i am looking for anywhere.

    i am using the code below to show posts, using their ids.the problem is that i can't sort them the way i want - i need to order them exactly in order of the ids (currently it is sorting asc or desc.

    i don't need that, i only want to show them exactly in the order of the ids)

    $query_args = array('post_type'=>'post', 'category' => '3', 'numberposts'=>'50', 'post_status'=>'publish', 'include' => '100,124,122');
    $query_posts = get_posts($query_args);
    $last_query = end($query_posts);
    foreach ($query_posts as $post) : setup_postdata($post);

    any ideas?

    thank you

Reply

You must log in to post.

About this Topic