Posts 2 Posts
relationship query (1 post)

  1. aaron@rossano.com.au
    Posted 3 years ago #


    I've got two objects, events and sessions.
    an event can have multiple sessions.

    I'd like to get all the events within a date range of today upto 14 days from today.
    The date range is a meta_key startDate / endDate in session.

    how am I best to retrieve the events?

    should I query all the sessions for the date range and then take all the IDs and query the events for relationship IDs?

    or can I get all the events and then when setting the relationship to the sessions can i add in a meta_query to filter out only sessions within the range? then only show events with sessions?

    how would i write the code for that?
    thanks in advance.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by aaron@rossano.com.au
  • This topic is not resolved
  • WordPress version: 3.4.2