I have 2 custom post types: agenda and doel.
At each agenda post, I want to choose a doel post to attach it to, and the same with normal posts.
So I want a connection between posts, agenda, en doel.
I found this plugin called posts2posts from scribu, it does attach the posts types to each other, but I can not find out how and if it is possible to connect certain posts from one post type to certain posts from an other post type.
The ideal solution would be to have a dropdown in one post type, that shows all the posts from an other one, and you can select one.
In example, when editing a post from agenda, I can choose a post from doel to attach it to.
And later on I want to loop that.
Does someone know how this can be done easily, or recommend a good plugin?
Sorry for my bad explanation, hope it is kind of clear.
Plugin Recommendations are considered off-topic here. One solution could be to add a metabox to your post like so:
Add to Functions.php
What this does is create a small metabox with a dropdown of Doel posts – then saved the Doel Post ID as a meta value. You can get that meta-value (Doel Post ID) at any time by passing in the Agenda ID to
get_post_meta()
function.$meta_doel = get_post_meta($post->ID, '_doellist', true);
Then you could get the entire Doel post like so:
$doel_post = get_post($meta_doel);