• Resolved GreWeb

    (@fil6718)


    As there is a shortcode to display my reservations “[my_bookings]”, is there a shortcode to display the “Manage Reservations” page, the bookings_page ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • There no such shortcode but you could create one using the following code snippet:

    add_shortcode('my_bookings', function() {
    return em_get_my_bookings();
    });
    Thread Starter GreWeb

    (@fil6718)

    I found this code

    function em_get_my_bookings_shortcode(){
    return em_get_my_bookings();
    }
    add_shortcode ( 'my_bookings', 'em_get_my_bookings_shortcode');

    in the em-shortcode.php page. I think it’s the same.

    I search to display Manage bookings page.

    Only users with the manage_bookings and/or manage_other_bookings capabilities can view this page. To create a shortcode to display this:

    add_shortcode('bookings', function() {
    ob_start();
    em_bookings_dashboard();
    return ob_get_clean();
    });
    Thread Starter GreWeb

    (@fil6718)

    Thanks to @joneiseman to help me.

    I add the code in the file function.php, add [bookings] on my page but nothing appear.

    The user have all capabilities.

    Change it to this:

    add_shortcode('bookings', 'em_get_bookings_admin');
    • This reply was modified 1 month, 1 week ago by joneiseman.
    Thread Starter GreWeb

    (@fil6718)

    Works fine, thanks a lot !

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