• Resolved tezalsec

    (@tezalsec)


    Hi,

    thanks for a great plugin! I am checking out its options.

    Would it be possible to render a registration form for the first upcoming event? So that when that one event passes, automatically the registration form for the next first upcoming event is displayed.

    For instance, the TEC Shortcodes plugin solves this with this shortcode to show the event details:
    [ecs-list-events limit=’1′ order=’ASC’ venue=’false’ eventdetails=’true’ contentorder=’title, date’ key=’start date’]

    Do you have a similar solution, through shortcode or snippet, that automatically pulls the form for the first upcoming event?

    Cheers!

    • This topic was modified 3 years, 9 months ago by tezalsec.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author roundupwp

    (@roundupwp)

    Glad you like the plugin!

    We don’t have a feature like this at the moment but it does make a lot of sense! You might be able to use this other plugin in fact. If there is a PHP hook to add your own content to the list you could add:

    echo do_shortcode( '[rtec-registration-form event="' . get_the_ID() . '"]' );

    Though you would need some comfort with PHP for this I suppose.

    – Craig

    Thread Starter tezalsec

    (@tezalsec)

    Thanks for the hint!

    I managed to create my own shortcode, wrapping yours, and it’s working

    
    // Shortcode
    function rtec_registration_first_upcoming_event_shortcode( $atts ) {
    
        global $wpdb;
        $event_id = $wpdb->get_var($wpdb->prepare("select post_id from postmeta where meta_key = '_EventStartDate' and meta_value > now() order by meta_value LIMIT 1;"));
        echo do_shortcode( '[rtec-registration-form event="' . $event_id . '" hidden="false" showheader="true"]' );
    
    }
    add_shortcode( 'rtec_first_upcoming_event_registration_form', 'rtec_registration_first_upcoming_event_shortcode');
    

    ??

    • This reply was modified 3 years, 9 months ago by tezalsec.
    • This reply was modified 3 years, 9 months ago by tezalsec.
    Plugin Author roundupwp

    (@roundupwp)

    Ahh very nice! That should work just fine I’d imagine.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show registration form for first upcoming event’ is closed to new replies.