• Resolved Kestrel

    (@luthien01450)


    Hi, no luck finding this searching here, google, Events Manager web site.

    Is there a shortcode for My Bookings? I know there is a page, but I would like to add this information elsewhere – for example, a custom tab on Ultimate Member’s account or profile pages.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • https://wp-events-plugin.com/documentation/placeholders/

    No shortcode, but there is a placeholder. #_BOOKINGLISTURL will output the URL to page showing that users booked events.

    You could also quite easily create your own shortcode that includes the my-booking.php template file.

    Here you go… ??

    function em_shortcode_my_bookings() {
    	ob_start();
    	echo '<h2>' . esc_html__('My Bookings', 'events-manager') . '</h2>';
    	em_locate_template( 'templates/my-bookings.php', true );
    	$output = ob_get_clean();
    	return $output;
    }
    add_shortcode('my_bookings', 'em_shortcode_my_bookings');
    
    Thread Starter Kestrel

    (@luthien01450)

    Thank you so much for this! I really appreciate it. Works like a charm.

    • This reply was modified 5 years, 2 months ago by Kestrel.
    • This reply was modified 5 years, 2 months ago by Kestrel. Reason: mark as resolved

    Hey, i am new to wordpress, and i didnt understand this. Nothing happened when i put Patricks “shortcode” in to the shortcode widghet in elementor.

    Hi @babymilo,

    Ehm… After posting this I actually found EM has an undocumented, ready-to-go shortcode built right in: [my_bookings]

    Does that work for you?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcode for My Bookings?’ is closed to new replies.