Multiple connections
-
Hi i’m using your awsome plugin but i have 3 different content type and need multiple connections.
Content Types:
movie, actor, teaserNeeded connections:
movie <-> actor
movie <-> teaserfunction my_connection_types() { p2p_register_connection_type( array( 'name' => 'movie_to_actor', 'from' => 'movie', 'to' => 'actor' ) ); } add_action( 'p2p_init', 'my_connection_types' ); function my_connection_types() { p2p_register_connection_type( array( 'name' => 'movie_to_teaser', 'from' => 'movie', 'to' => 'teaser' ) ); } add_action( 'p2p_init', 'my_connection_types' );
But i’m getting this error;
Fatal error: Cannot redeclare my_connection_types() (previously declared in /functions.php:247) in /functions.php on line 260
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Multiple connections’ is closed to new replies.