Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter djrowan

    (@djrowan)

    Hey Scribu,
    Thanks for the reply.

    This works to get future entries:
    $connected = new WP_Query( array(
    ‘post_status’ => ‘future’,
    ) );

    This fails to return any results:
    $connected = new WP_Query( array(
    ‘post_status’ => ‘future’,
    ‘connected_type’ => ‘event_artists’,
    ‘connected_items’ => get_queried_object_id()
    ) );

    WHOOHOO .. i just cracked it. I was missing the ‘connected_direction’ parameter.

    Here’s my successful query for future events:
    $connected = new WP_Query( array(
    ‘post_status’ => ‘future’,
    ‘connected_type’ => ‘event_artists’,
    ‘connected_items’ => get_queried_object_id(),
    ‘connected_direction’ => ‘any’
    ) );

    Thank you for helping me work through that one. That took a LONG time to figure out, but I’m stoked to have it now.

    cheers
    rowan

Viewing 1 replies (of 1 total)