AlecB123
Forum Replies Created
-
I’m not 100% sure but maybe I can point you in the right direction…
To show all projects made with product A, you would do:
$connected = new WP_Query( array(‘post_type’ => ‘project’,’posts_per_page’ => -1,’orderby’ => ‘title’, ‘order’ => ‘ASC’,’connected’ => [PRODUCT ID]) );It makes sense to me that making any search script, then adding ‘connected’ => [PRODUCT ID] to the wp query would do exactly what you’re looking to do.
Thanks for your reply,
Not sure what the problem was, but after a few days of not touching anything because I didn’t want to break the website, i fixed it…. all I had to do was add a new relationship to each of the types of connections, then all of the data reappeared in the backend… so I now have a fully functioning version of 1.1.2.You’re right scribu, the reason for it breaking on my 1.1.3 is because i don’t have explicit names on my connection types, however defining explicit names and doing an update on the p2p table doesn’t work for me because it seems like the hashes have been duplicated for some of the connections – my hash list is at https://pastebin.com/qe7bnTCu
I’ll have a go at regenerating new p2p_type’s based on the post type in a week or so
More info – I’m using WP3.3, not using multisite; When I said I downgraded to 1.1.2 from a backup, I only replaced the files, I didn’t have a DB dump to restore – my set up worked perfectly before upgrading to v1.1.3
Thanks! This is a fantastic plugin – perfect for my site!