List Output of Related Items
-
Hi,
I’m setting up a page and try to go beyond the usual WordPress features but I’m hitting a brick wall right now and it feels like I just can’t get the right shortcode working.
I have expanded the pages post type to be able to feed other pods content into my pages. So right now I have
Pages and Products in a bi-directional relationship (each Page can have different Products and each Product can be found on different Pages), so essentially two Pods: Page & Product.
Page has a field named products (besides the other field like Title and I’m using Divi Pagebuilder for the content.
Product has a field names pages (besides Title, Image and Description)I built a Pods Template (product list) to display my products
[before]<ul>[/before] <li> <div class="product-image"><img src="{@productimage._src}" /></div> <div class="product-title">{@post_title}</div> <div class="product-descr">{@description}</div> </li> [after]</ul>[/after]
and with the shortcode
[pods name=”product” template=”product list”]
I can show all my products and style them, nice. But now I want to only show the products that relate to the page I post the shortcode on. I can change the shortcode everytime. And this is where it ends for me. I tried it with all combinations of the where declaration to filter the list for only the ones which have the pagename in the custom field (above mentioned relationship) – but I can’t get it to work. I hope it is pretty easy – but I’m just totally blacking out. Help? :'(
- The topic ‘List Output of Related Items’ is closed to new replies.