0

Custom Post Types:

vendor solution appointment

Each appointment has a relationship field vendor_solution that's connected a vendor to an appointment. A user is attached to a vendor by way of a user_vendor custom field.

I need to be able to get all appointment for the currently logged in user and I'm having a hard time construction the correct WP_Query to do so. I know this requires a nested meta_query, but this has always confused me.

User:

  • user_vendor

Solution:

  • vendor

Appointment:

  • vendor_solution

Again, I need all appointment for the currently logged in user. The user makes the connection to the vendor

dcolumbus
  • 9,596
  • 26
  • 100
  • 165
  • how is the user attached to the meta? via custom post type or usermeta? – Moishy Feb 28 '23 at 20:06
  • Hi, maybe I miss something, but, why don't you "simply" add a direct relation between a user (client I guess) and an appointment? Appointment should hold a reference of each party involved no? – Dexter0015 Mar 01 '23 at 06:40

0 Answers0