This is the error I get with debug mode on:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE from=1 AND type='post2conf' ORDER BY order_from' at line 1]
SELECT to FROM WHERE from=1 AND type='post2conf' ORDER BY order_from
This is the code i'm trying to use:
add_action( 'mb_relationships_init', function () {
MB_Relationships_API::register( array(
'id' => 'post2conf',
'from' => array(
'object_type' => 'post',
'admin_column' => true, // THIS!
),
'to' => array(
'object_type' => 'post',
'post_type' => 'conference',
'admin_column' => 'after title', // THIS!
),
) );
} );
While i'm a it, I wanted to know if there was a way to create a many to many relationship.
I'd like to allow my user to link different custom post type between them (conferences, publications, posts, people (not users), etc.)