WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Joining multiple post queries (2 posts)

  1. joesmalley
    Member
    Posted 4 years ago #

    How can I join together two post queries in my Archives template? I am trying to create a custom sort order for which I need one query's posts first, followed by another. I tried this but doesn't work:

    global $query_string;
    $posts1 = get_posts($query_string . "&p=1");
    $posts1 = get_posts($query_string . "&p=2");
    $post = array_merge($posts1, $posts2);

    (query parameters obviously simplified)

  2. joesmalley
    Member
    Posted 4 years ago #

    I found out how to do it - but it causes all kinds of problems with pagination

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.