[Resolved] [Plugin: Posts 2 Posts] Edits args for get_connected()
I’m using the Posts 2 Posts plugin, which seems perfect for most of what I want to do, but there are a couple of features that I cannot work out through reading the documentation, so I wonder if someone could help?
Firstly, I need to show connections in the ‘to’ direction in one instance –
$children = p2p_type('service_parents_and_children')->set_direction('to')->get_connected(get_queried_object_id());
This works, but with the default WP args being passed (5 posts, date order, etc) – is there a way to pass my own custom args so that I can get the posts displaying as I require?
Also, I’m looking for a way of showing a posts ‘siblings’, I.e posts that have the same ‘from’ connection to a certain post (I have the ID of the post). I’ve explored
get_related(), but I can’t seem to get it to do what I want.
This is a great plugin, so I’m fairly confident that these tasks can be acheived, so any help is greatly appriciated.
- The topic ‘[Resolved] [Plugin: Posts 2 Posts] Edits args for get_connected()’ is closed to new replies.