• Resolved joshrodgers

    (@joshrodgers)


    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

    (@joshrodgers)

    I figured it out!!

    I used an array to query both my posts and my custom post type posts, I used the following code: https://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.