Custom single event page for past events

WordPress Event Management, Calendars & Registration Forums General Question Custom single event page for past events

This topic contains 5 replies, has 2 voices, and was last updated by  Catherine Lepper 10 years, 11 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10171

    Hi,
    great plugin, I’ve used it before, and now I’m using the pro version in a bespoke project:

    http://islingtonproms.com

    my query is can I get past events only to use a different custom single-event page than a standard one? (I want to exclude the booking info from the past events single pages).
    Is it possible to direct the loop to a custom page in the theme functions.php file? Or would that have to be part of the plugin?

    I tried using a function hook and if statement within the single-event.php page to vary the output, but couldn’t figure that out.. Is this a better option, and is it possible?
    Please help or let me know who can, any clue would be of assistance!

    Thanks,

    Catherine

    Catherine Lepper
    #10175

    Sorry, wrong link, it’s actually http://islingtonproms.org

    Catherine Lepper
    #10177

    Hi Catherine,

    In the template, where you’ve added the details to the template you can wrap it in the following if statement

    $now = new DateTime( 'now', eo_get_blog_timezone() );
    if( $now <= eo_get_schedule_last( DATETIMEOBJ ) ){
          //Add link
     }

    eo_get_schedule_last() returns the (start) date of the last occurrence for the event . (If the event is non-recurring then this is the start date of the event). The above ifstatement displays the link only when that date is after ‘now’.

    If you’re using the booking feature in Pro, then that should automatically suppress the booking form when the event has finished.

    Stephen Harris
    #10251

    Hi Stephen,

    thanks so much, this works perfectly, I knew there had to be a solution but couldn’t work it out,
    thanks a million!
    I did contact you via contact form also to say I would pay for your time, however I didn’t realise you had already answered the question here in the forum, as I didn’t get notification of your reply, although I ticked the box at the bottom of the form..
    Let me know if I can make a donation and how!

    Cath

    Catherine Lepper
    #10280

    Hi Cath,

    Sorry, I should have e-mailed to let you know that I responded on the forums! No donation is necessary, this all part of the support 🙂

    Stephen Harris
    #10308

    Hi Stephen,
    no problem, and thanks again for the support 😉

    Catherine Lepper
Viewing 6 posts - 1 through 6 (of 6 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.