• Resolved m0tty

    (@m0tty)


    Hi!

    I’m looking to display the old events in a widget on the page of each production, but the shortcode
    [wpt_events start=”03-09-2012″ end=”today -1 day”]{{title}}{{date}}[/wpt_events] display all the past events of all productions.

    And [wpt_production_events] can’t handle parameters. I’m wondering if its possible to have something like this :
    [wpt_production_events start=”03-09-2012″ end=”today -1 day”]{{title}}{{date}}[/wpt_production_events]

    Or there is an other way to display old events of the current production without manually select a specific category (because I use the shortcode in a widget)?

    Thx for your help!

    • This topic was modified 5 years ago by m0tty.
    • This topic was modified 5 years ago by m0tty.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeroen Schmit

    (@slimndap)

    I am afraid not.

    You need to use the shortcode like this:
    [wpt_events production="123" start=”03-09-2012″ end=”today -1 day”]{{title}}{{date}}[/wpt_events]

    …but this would require you to add the ‘123’ manually on each page.

    The only way I can of is by adding a piece a PHP to the template file:

    echo do_shortcode( '[wpt_events production="<?php echo get_the_id(); ?>" start=”03-09-2012″ end=”today -1 day”]{{title}}{{date}}[/wpt_events]' );

    Perhaps you can use another plugin that lets you insert PHP inside a widget.

    Thread Starter m0tty

    (@m0tty)

    Hi!

    Thx a lot for the fast response.

    If I just put the code
    [wpt_events production="MY-EVENT-NAME" start="03-09-2012" end="now"]{{title}}{{date}}[/wpt_events]
    on a production page, nothing appears.

    I also have installed a plugin to allow php in widget, unfortunately this specific piece of code doesn’t work (but others does).

    I’m not good enough in php to successfully modify the template :-s

    Thx for your help!

    Thread Starter m0tty

    (@m0tty)

    Hi!

    I have found a workaround. I use a plugin to customize sidebar on a per-page basis then I apply a specific shortcode. It work well because I have a small number of pages to customize ;-).

    Thanks anyway for your support and your amazing plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display old events on production page’ is closed to new replies.