YITH Wishlist plugin displays the same product id for every product [closed]

I shouldn’t really be answering this, as third party plugins are off topic for this stack, but it’s a pretty simple fix.

The reason it’s happening is as you surmised because you’re using it outside of the Loop. You could solve it by running setup_postdata($post_id) before you echo your products, but that doesn’t solve the deeper issue: if you’re running MySQL queries in a template you’re doing something very wrong (especially raw, unparameterized queries which are a huge security hole). I see no reason in the code above why you couldn’t use the WP_Query class to fetch your data, which would be much safer and take care of setting up Post objects for you.

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduseduseduseduedusedueduedusedus