Support » Plugin: Posts 2 Posts » How to filter by connected posts?

  • I have portfolios connected to services.

    I want to show only the works related to services A and C. How to do that?

    Surely I have to use WP_Query, but I don’t know how:

    $query = new WP_Query( array(
    	'post_type' => 'portfolio',
    	<my filter id here> => array(
    			<connected post type> => 'page',
    			'value' => array( <A service id>, <C service id> ),
    ) );

  • The topic ‘How to filter by connected posts?’ is closed to new replies.