WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
How to filter by connected posts? (1 post)

  1. Marco Panichi
    Member
    Posted 1 year ago #

    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(
    		array(
    			<connected post type> => 'page',
    			'value' => array( <A service id>, <C service id> ),
    		)
    	)
    ) );

    http://wordpress.org/extend/plugins/posts-to-posts/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.