Support » Plugin: The Events Calendar » Insert the page of the organizer version in my template
Insert the page of the organizer version in my template
-
I’m using the free version which doesn’t allow short code. How can I insert the page of the organizer version in my template?
I’ve tried to copy the code from organizer.php, but without success.
Thanks
-
Hi @antoniopaim,
That unfortunately isn’t a super easy customization to make so it might quite a bit of development knowledge to get to.
Let me try to aid you in figuring out a path forward.
What file is that you are talking about? Would you mind sending me the whole path and content of the
organizer.php
file you mentioned?best regards.
Excuse me. I reported incorrectly. The file I need to include in my template is the month.php code. I tried to open and copy all the code, but an error occurs.
<?php $header_classes = [ 'tribe-events-header' ]; if ( empty( $disable_event_search ) ) { $header_classes[] = 'tribe-events-header--has-event-search'; } ?> <div <?php tribe_classes( $container_classes ); ?> data-js="tribe-events-view" data-view-rest-nonce="<?php echo esc_attr( $rest_nonce ); ?>" data-view-rest-url="<?php echo esc_url( $rest_url ); ?>" data-view-rest-method="<?php echo esc_attr( $rest_method ); ?>" data-view-manage-url="<?php echo esc_attr( $should_manage_url ); ?>" <?php foreach ( $container_data as $key => $value ) : ?> data-view-<?php echo esc_attr( $key ) ?>="<?php echo esc_attr( $value ) ?>" <?php endforeach; ?> <?php if ( ! empty( $breakpoint_pointer ) ) : ?> data-view-breakpoint-pointer="<?php echo esc_attr( $breakpoint_pointer ); ?>" <?php endif; ?> > <div class="tribe-common-l-container tribe-events-l-container"> <?php $this->template( 'components/loader', [ 'text' => __( 'Loading...', 'the-events-calendar' ) ] ); ?> <?php $this->template( 'components/json-ld-data' ); ?> <?php $this->template( 'components/data' ); ?> <?php $this->template( 'components/before' ); ?> <header <?php tribe_classes( $header_classes ); ?>> <?php $this->template( 'components/messages' ); ?> <?php $this->template( 'components/breadcrumbs' ); ?> <?php $this->template( 'components/events-bar' ); ?> <?php $this->template( 'month/top-bar' ); ?> </header> <?php $this->template( 'components/filter-bar' ); ?> <div class="tribe-events-calendar-month" role="grid" aria-labelledby="tribe-events-calendar-header" aria-readonly="true" data-js="tribe-events-month-grid" > <?php $this->template( 'month/calendar-header' ); ?> <?php $this->template( 'month/calendar-body' ); ?> </div> <?php $this->template( 'components/messages', [ 'classes' => [ 'tribe-events-header__messages--mobile' ] ] ); ?> <?php $this->template( 'month/mobile-events' ); ?> <?php $this->template( 'components/ical-link' ); ?> <?php $this->template( 'components/after' ); ?> </div> </div> <?php $this->template( 'components/breakpoints' ); ?>
Completing: on this page that I want to include the calendar, it runs a query that loads a list of posts, below the calendar.
Thanks!
As I mentioned that is not a super simple customization, that is why our Shortcodes are part of our Pro Plugin, because it’s a tricky piece to include separately.
We have plans to re-visit parts of this code in the future to make it easier to do what you are suggesting without more extensive WordPress coding experience, but for now what I can point you in the direction of is:
tribe( Template_Bootstrap::class )->get_view_html()
Which wont load assets properly, becuase those are tied to the/events
page.Or
Tribe\Events\Views\V2\View::make( 'month', tribe_context() )->get_html()
Again both are not made to be included standalone, due to how complex the month view actually is.
Best regards,
Thanks Gustavo.
- The topic ‘Insert the page of the organizer version in my template’ is closed to new replies.