Home › Forums › Front-end Issues › Relating posts with Woocommerce products › Reply To: Relating posts with Woocommerce products
Actually, I’m trying to display the related posts on the single product page, not the single post. So if I were to put the code you referenced above on the content-single-product.php page, nothing prints.
Just in case my original post isn’t clear, the admin Relationship field is set up to appear on the admin post page. This is where I select all products associated to that particular post. Then I’m trying to display the results on the content-single-product.php page for each product that is associated to the post.
So far what its resulting in (using the code I included in my second post) is the post appears on every product page, not only for each selected product. And it sometimes appears more than once.
Again, thanks for your help!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.