wp-posts-to-posts icon indicating copy to clipboard operation
wp-posts-to-posts copied to clipboard

How to display connections in woocommerce product list

Open andrearuffini opened this issue 10 years ago • 1 comments

I have a many to many connection from woocommerce products custom type to a manufacturer custom type. When I try to display the manufacturer's connections on the single product page everything works but when I try to display the same connections on the products list page (in every product listed) it does not work.

I tried get_queried_object() and each_connected() methods but no one worked for me.

I think I need to add an each_connected() call into the woocommerce_loop.

Do you have any solution?

Thanks, Andrea

andrearuffini avatar May 12 '14 18:05 andrearuffini

I have a similar problem. But I think it doesn't depend on woocommerce, because I don't use it. At my site the problem appears only on pages that uses the build-in search of wordpress. That might be the product lists in woocommerce. On all other pages it works fine, with the exact same code. I couldn't figure out why. Also forcing the connection with 'connected_direction' and 'post_type' didn't work out.

Thanks for any help with that,

zambadu

zambadu avatar Feb 03 '15 14:02 zambadu