• I have a connection type where there are schedule_item post_types connected to film post_types.

    The schedule items have metadata like ‘venue’, ‘date_start’, and ‘time_start’.
    The films have metadata and taxonomies like ‘country’ and ‘length’.

    Is there any way I can query for films in a certain country connected to schedule items on a certain date?

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

Viewing 1 replies (of 1 total)
  • Should be possible with the connected_query parameter, added in 1.4.

    $films = new WP_Query( array(
        'post_type' => 'film',
        'meta_key' => 'country',
        'meta_value' => 'USA',
        'connected_type' => 'your_connected_type',
        'connected_to' => 'any',
        'connected_query' => array(
            'meta_key' => 'date_start',
            'meta_value' => '2012-01-01'
        )
    ) )

    More info: http://scribu.net/wordpress/posts-to-posts/p2p-1-4.html

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Posts 2 Posts] Query parameters on both sides of connection’ is closed to new replies.