Title: Sorting Two Queries
Last modified: August 20, 2016

---

# Sorting Two Queries

 *  Resolved [joshrodgers](https://wordpress.org/support/users/joshrodgers/)
 * (@joshrodgers)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/sorting-two-queries/)
 * Basically I have a website that has regular posts and custom post type posts.
   They share categories…like officer, member, etc.
 * if I query the category name it’ll return only regular posts and leave out my
   custom post type posts. However, if I query the category name with the post type
   it only returns custom post type posts and will leave out my regular posts.
 * Is there any way I could query the category name of both of them so WordPress
   will return my regular posts and custom post type posts?
 * I tried creating two queries, which works, but puts the results side-by-side.
   I want it to return the results all together. Any ideas?
 * Thanks,
    Josh

Viewing 1 replies (of 1 total)

 *  Thread Starter [joshrodgers](https://wordpress.org/support/users/joshrodgers/)
 * (@joshrodgers)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/sorting-two-queries/#post-2434429)
 * I figured it out!!
 * I used an array to query both my posts and my custom post type posts, I used 
   the following code: [http://pastebin.com/r2a304Ft](http://pastebin.com/r2a304Ft)
 * In the array “post” returns my posts and “inductees” is the name of my custom
   post type. Hope this helps someone!!
 * Thanks,
    Josh

Viewing 1 replies (of 1 total)

The topic ‘Sorting Two Queries’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [queries](https://wordpress.org/support/topic-tag/queries/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [sorting](https://wordpress.org/support/topic-tag/sorting/)
 * [two](https://wordpress.org/support/topic-tag/two/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [joshrodgers](https://wordpress.org/support/users/joshrodgers/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/sorting-two-queries/#post-2434429)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
