scribu / wp-posts-to-posts

Efficient many-to-many connections between posts, pages, custom post types, users.
http://wordpress.org/plugins/posts-to-posts/
969 stars 260 forks source link

Progamatically set connections between actual posts. Possible? #537

Closed shmulim closed 7 years ago

shmulim commented 7 years ago

I'm digging through the documentation in search for a way to register connections between actual posts and not just between post types. Is there some kind of set_connected() or set_related() method , just like you can get_connected() or get_related()? I'm trying to create a user-facing form to create a post and connect it to another post. Can this be done with the current API?

chrisgherbert commented 7 years ago

Is this what you're looking for? https://github.com/scribu/wp-posts-to-posts/wiki/Creating-connections-programmatically

shmulim commented 7 years ago

Thanks, that's it! :)