[Plugin: Posts 2 Posts] query with multiple post types and same relationship overrides results
-
hi, i’ve created a wp_query to get two custom post types. post_type1 and post_type2.
both are connected to post_type3. when i set my relationship on the query, the second relationship overrides the first one and erases the results, that forces me to use a different name for the results and having to duplicate code further when looping within the relationship.wp_query: ‘post_type’ => array(‘post_type1’, ‘post_type2’),..
p2p_type( ‘post_type1_to_post_type3’ )->each_connected( $my_query, array(), ‘post3’ );
p2p_type( ‘post_type2_to_post_type3’ )->each_connected( $my_query, array(), ‘post3’ );am i doing something wrong, or is this a bug?
- The topic ‘[Plugin: Posts 2 Posts] query with multiple post types and same relationship overrides results’ is closed to new replies.