Tell us what you are trying to do?
I have a business post type. Each business has multiple opening times, stored in a related 'opening_times' post type, with the following fields: Day (Mon, Tue, ...), Opening time (12:00 PM). Closing Time (10:00 PM).
I want to be able to search and find all Businesses which are 'Open Today' based on the day, and 'Open Now', based on the current time.
I doubt there is any way to do this using the UI (not that I can find in the documentation anyway). But that's ok, I am proficient in php and api's, but I need to know the best approach.
For example: Can I use the wpv_filter_query filter to alter the WP_Query parameters to perform the search? I have hooked into it, performed a standard filter on the relationship and examined the $query variable, but I can't see how the relationship search works. There doesn't seem to be any $query params that specify the relationship search. It looks like the relationship filter is done earlier. If so, can I hook into that?
I have done this previously using PODS, so I know it can be done, and that I can do it, but there just isn't enough doco on how to perform a custom relationship search.
Is there any documentation that you are following? Have read all of the standard custom search, filter api and relationship doco, but it didn't help.
Is there a similar example that we can see?
Here is my PODS example: hidden link
Hello. Thank you for contacting the Toolset support.
Well - so basically you can display the associated parent when you set your view to query your child posts. I would like to know how you setup your query filters?
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.