[Plugin: Posts 2 Posts] Metabox search not respecting connection
-
Hi all,
I’ve got my posts connected to a custom post type called destination. When a post is written, I’d like the author to assign it to a destination. The problem is that the search brings up all slugs, regardless of the connection set, that match the term while listing the connected ‘posts’ respects the connection. Have I set up my connection incorrectly, or is this a known issue when using the search? Any help is greatly appreciated. Here is my connection code:
//Posts 2 Post Connections function my_connection_types() { // Make sure the Posts 2 Posts plugin is active. if (!function_exists('p2p_register_connection_type')) return; //events p2p_register_connection_type( array( 'id' => 'event_destination', 'from' => 'event', 'to' => 'destination', 'sortable' => 'any')); p2p_register_connection_type( array( 'id' => 'event_recprogram', 'from' => 'event', 'to' => 'recprogram', 'sortable' => 'any')); p2p_register_connection_type( array( 'id' => 'event_project', 'from' => 'event', 'to' => 'project', 'sortable' => 'any')); //posts p2p_register_connection_type( array( 'id' => 'post_destination', 'from' => 'destination', 'to' => 'post', 'sortable' => 'any')); p2p_register_connection_type( array( 'id' => 'post_recprogram', 'from' => 'post', 'to' => 'recprogram', 'sortable' => 'any')); p2p_register_connection_type( array( 'id' => 'post_project', 'from' => 'post', 'to' => 'project', 'sortable' => 'any')); //people p2p_register_connection_type( array( 'id' => 'employee_manager', 'from' => 'employee', 'to' => 'employee', 'cardinality' => 'one-to-many', 'sortable' => 'any', 'title' => array( 'from' => 'Manages', 'to' => 'Managed by' ))); //managed p2p_register_connection_type( array( 'id' => 'recprogram_managers', 'from' => 'employee', 'to' => 'recprogram', 'sortable' => 'any')); p2p_register_connection_type( array( 'id' => 'project_manager', 'from' => 'project', 'to' => 'employee', 'cardinality' => 'many-to-many', 'sortable' => 'any', 'title' => array( 'from' => 'Project Manager', 'to' => 'Projects Managed'))); p2p_register_connection_type( array( 'id' => 'destination_manager', 'from' => 'destination', 'to' => 'employee', 'cardinality' => 'many-to-many', 'sortable' => 'any', 'title' => array( 'from' => 'Destination Manager', 'to' => 'Destinations Managed'))); } add_action( 'init', 'my_connection_types', 100 );
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘[Plugin: Posts 2 Posts] Metabox search not respecting connection’ is closed to new replies.