Support » Plugin: Theater for WordPress » Accessing events within [wpt_productions]

  • I have this shortcode:
    [wpt_productions groupby="day" paginateby="month" start="now"]{{thumbnail|permalink}} {{title|permalink}} {{excerpt}}[/wpt_productions]
    This looks good, but I need to get access to each production’s show times for each day. Is there a filter I can use to achieve this?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • I can see that the events are loaded with the productions with preload_productions_with_events() and if I put {{events}} into my shortcode template, it will display “Array.” I just can’t figure out how to get into that array.

    Plugin Author Jeroen Schmit

    (@slimndap)

    You can use the {{ dates }} placeholder and then use the wpt/production/dates/html filter to customize the output:
    https://github.com/slimndap/wp-theatre/blob/master/functions/wpt_production.php#L238

    Thanks, but I’m a bit confused. The {{dates}} placeholder displays the dates. I already have everything grouped by date. A production can have multiple show times in a single day. The times are what I need access to.

    Yeah. I am having a really hard time figuring this out. The shortcode mentioned in th OP is now on this page
    There has got to be some way of getting the show times for each day’s productions, but I am really stuck.

    Plugin Author Jeroen Schmit

    (@slimndap)

    This is a quite complicated feature to add.

    It is relatively easy to show all the show times of a each production in the list. In fact, there already is an extension that does just that: https://wp.theater/downloads/timetable-for-theater/

    Unfortunately, you would only like to show the showtimes of a single day foreach production. I don’t see an easy solution right now. It would require a lot of custom coding.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.