Hi, we need to select posts in a loop filtering them according to the "primary" element in the taxonomy "branca-tax" (primary status is set by Yoast SEO plugin).
More in detail: in the template "location" (for the CPT "locations") we have a view that prints the CPT "services" (filtering only the services of the current location), this view contains a nested view that shows elements from the CPT "doctors". Here, we need to filter these doctors according to their primary "service" taxonomy (it's slug is "branca-tax"): if a doctor has more than one service selected, we need to use only the primary one.
Now this code is giving zero results. I suppose it's because the "$primary_term = get_post_meta($post->ID..." is referring to the post where the view is used (the location), instead we need to look at the post in the loop but maybe there's something more...
Hello. Thank you for contacting the Toolset support.
It does not require I guess to add "wpv_filter_query" hook most probably if its available to add the taxonomy filter with "Query Filter" section of your view.
Can you please share problem URL where you added your view and what is your expected result.
*** 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 have set the next reply to private which means only you and I have access to it.
Hi Minesh, sorry for the late reply, my client has chosen to show only the Services and hide the Doctors, so we no longer need your help at the moment.