How to display related woocommerce products in template
-
Hi there
I have created a content type called “Suburbs” and a custom taxonomy called “Regions”. Suburbs are grouped by Region. I also have appointment products in Woocommerce that are also grouped into these Regions. I would like to display the related appointment products on the Suburb page but not sure how to achieve this.
Below is a snippet of the Suburb Detail template I created from following your tutorials, which outputs the Related Trainers for example, and I would like to do the same for the Related Products. I’ve seen magic tags like
related_suburbs.related_regions.related_products and related_regions.related_products in my Pods reference and tried my luck displaying them in my template, but nothing happens, but maybe I’m doing it wrong. Please advise how this can be achieved. Thank you!<p style="text-align: center;">We offer private classes in {@post_title}.</p> [if related_trainers] <p style="text-align: center;">Trainers serving this suburb: [each related_trainers] <a href="{@permalink}">{@post_title}</a>, [/each] </p>
- The topic ‘How to display related woocommerce products in template’ is closed to new replies.