display booking dashboard
-
Is there a shortcode or palceholder to display the booking dashboard (see screenshot)?
The page I need help with: [log in to see the link]
-
Where’s the screenshot?
Here’s a code snippet to create the shortcode [my-em-bookings] to display the recent bookings table (it contains the bookings for all of the events):
add_shortcode('my-em-bookings', 'my_em_bookings'); function my_em_bookings() { ob_start(); ?> <div class='em-bookings-admin-dashboard em-bookings-dashboard <?php em_template_classes('bookings-admin'); ?>'> <div class="input"> <div class="em-bookings-recent"> <h2><?php esc_html_e('Recent Bookings','events-manager'); ?></h2> <?php $EM_Bookings_Table = new EM_Bookings_Table(); $EM_Bookings_Table->output(); ?> </div> </div> <?php return ob_get_clean(); }You can use the Code Snippets plugin to add this code snippet.
-
This reply was modified 2 years, 4 months ago by
joneiseman.
I created a my-em-bookings plugin and created a php file with this content and when I activated the plugin it crashed, maybe there is an error in your script ?
<?php
/**- Plugin Name: mon-shortcode-em
- Description: affichage des réservations events manager
- Text Domain: clubdesplaisaix73
- Version: 1.0
*/
function my_em_bookings()
{
ob_start(); ?>output(); ?>
<?php
return ob_get_clean();add_shortcode(‘my-em-bookings’, ‘my_em_bookings’);
Don’t copy it from the email. Copy it from the post.
I created the directory wp-content/plugins/mon-shortcode-em and in that directory I placed the file mon-shortcode-em.php
Here’s the content of mon-shortcode-em.php:
<?php /* Plugin Name: mon-shortcode-em Description: affichage des réservations events manager Text Domain: clubdesplaisaix73 Version: 1.0 */ add_shortcode('my-em-bookings', 'my_em_bookings'); function my_em_bookings() { ob_start(); ?> <div class='em-bookings-admin-dashboard em-bookings-dashboard <?php em_template_classes('bookings-admin'); ?>'> <div class="input"> <div class="em-bookings-recent"> <h2><?php esc_html_e('Recent Bookings','events-manager'); ?></h2> <?php $EM_Bookings_Table = new EM_Bookings_Table(); $EM_Bookings_Table->output(); ?> </div> </div> <?php return ob_get_clean(); } ?>I did not get any error when activating the plugin and using the shortcode worked fine.
-
This reply was modified 2 years, 4 months ago by
joneiseman.
Very good! The plugin works perfectly, again thanks for your help
best regards
Gérard
Thanks to you I managed to test this plugin which ultimately corresponds to our expectations,
we will therefore install it on the real site,
I would like to thank you again for your effective help and for your skills,
if I could I would give you 5 stars out of 5
thanks again
-
This reply was modified 2 years, 4 months ago by
The topic ‘display booking dashboard’ is closed to new replies.