Display PODS list with variable/dynamic “WHERE” value
-
Hi
I have 2 PODS: fsp_providers and fsp_products
Each fsp_provider page needs to list fsp_products that fall under that fsp_provider.
I have created a meta value called “providers” which is linked to fsp_products and the values here match the titles (post_title) of relevant fsp_pdoviders. So each fsp_product has a meta value that matches its fsp_provider.
I am able to list relevant fsp_products matching the provider using the PODS list widget containing a WHERE statement as follows where BIDVEST is the name of the provider: providers.name = “Bidvest”
HOWEVER:
I need to dynamically populate the “Bidvest” value with the relevant fsp_provider.
So I thought to sort of use the fsp_provider post title (which will match the provider meta value) as the variable in the WHERE statement, something like:
WHERE providers.name = “post_title”
The above would “logically” extract the post_title of the current fsp_provider page, insert that value in the “post_title” and thereby have all fsp_products listed for that provider only.
OBVIOUSLY this doesnt work currently, but is there a way from a syntax point of view that I can extract the current page/fsp_provider post_title and insert it where “post_title” is in the WHERE statement?
Basically I need to list all fsp_products belonging to a specific fsp_provider on the fsp_provider page.
Any thoughts on achieving this would be massively appreciated.
Thanks so much.
- The topic ‘Display PODS list with variable/dynamic “WHERE” value’ is closed to new replies.