• Hey all,

    I’m having a real hard time wrapping my brain around how to properly execute a query to return some values involving custom post types and taxonomies. I have two custom post types – locations and equipment – and I also have two taxonomies for equipment – locations and equipment types. Equipment can belong to only one equipment type, but can be in multiple locations. I’ll break it all down below:

    Locations
    =========
    Location A
    Location B
    Location C

    Equipment Categories
    ====================
    Equip Category A
    Equip Category B
    Equip Category C

    Equipment Items
    ===============
    Equip Item 1
    Equip Item 2
    Equip Item 3

    What I want the user to be able to do is click a radio button for the location, then I want a separate checkbox group below to dynamically change (using jQuery) based on the location selection and return the proper equipment types with equipment belonging to both equip categories and the location selected. So in other words, I only want the relevant equipment types that have equipment items for the given location.

    I’m good on how to send the data to the PHP script to do the query in real time and I’m good with the jQuery used on the response to build the radio group dynamically. What I’m having an issue with is how to properly write the query itself.

    Is there anybody that can help me with the right arguments to send to query_posts to come up with this? I’ve of course tried Googling. Perhaps my data is setup all wrong too. I don’t even know, I figured doing the two taxonomies would be classification enough for the equipment items and I could query against those to return everything I needed to.

    Much appreciation in advance for any ideas!

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

    (@praeix)

    Request for this to be moved to WP-Advanced please? It seems like it would be a better fit for there.

Viewing 1 replies (of 1 total)
  • The topic ‘Need Help Figuring Out Query with Custom Post Types and Taxonomies’ is closed to new replies.