How to sync tags between posts that are linked through Posts 2 Posts?
I am faced with a thorny problem and can't seem to find the solution in
the wealth of community knowledge on the web. I have two custom posts
types "Person" and "Activities". I use posts 2 posts (plugin) to link
Persons with their various Activities and vice-versa.
I have Taxonomies which apply to Activities. They describe areas of
practice and interest. Using them, I'd like to be able to get a list of
Persons who partake in Activities tagged with "Cranes", for example. Where
"Cranes" is part of an Area of interest in my tag-like custom taxonomy.
I suspect the most practical way to go about it would be to apply the
taxonomy to both post-types and keep them in sync from the linked
Activities to the Persons automatically. Is there a way to do that?
Kind regards,
Evren
EDIT: My p2p_register_connection_type is as follows
function ghunige_connection_types() {
p2p_register_connection_type( array(
'name' => 'profile_to_activity',
'from' => 'ghunige_profile',
'to' => 'ghunige_activity',
'reciprocal' => true,
'title' => array( 'from' => __('Participates in',
'ghunige_dir_domain'), 'to' => __('Participants',
'ghunige_dir_domain') )
) );
}
No comments:
Post a Comment