-
-
Save bordoni/669b1d39898ae2d557a0b22de1503c71 to your computer and use it in GitHub Desktop.
To add the CSS file I've used: https://wordpress.org/plugins/simple-custom-css/ to add PHP Snippets: https://wordpress.org/plugins/code-snippets/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'tribe_template_after_include:events/v2/day/event/venue', static function ( $file, $name, $template ) { | |
$event = $template->get( 'event' ); | |
if ( ! $event ) { | |
return; | |
} | |
if ( ! $event->organizers ) { | |
return; | |
} | |
if ( ! $event->organizers->count() ) { | |
return; | |
} | |
foreach ( $event->organizers as $organizer ) : | |
$organizer_html = tribe_get_organizer_link( $organizer ); | |
?> | |
<div class="tribe-events-calendar-day__event-organizer"> | |
<?php echo $organizer_html; ?> | |
</div> | |
<?php | |
endforeach; | |
}, 15, 3 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tribe-common .tribe-events-c-search__button { | |
margin-right: var(--tec-spacer-2); | |
} | |
.tribe-common .tribe-events-c-subscribe-dropdown__button { | |
background: var(--global-palette-btn-bg); | |
color: var(--global-palette-btn); | |
} | |
.tribe-common .tribe-events-c-subscribe-dropdown__button:hover { | |
color: var(--global-palette-btn-hover); | |
background: var(--global-palette-btn-bg-hover); | |
} | |
.tribe-common .tribe-events-c-subscribe-dropdown__button button { | |
background: transparent; | |
} | |
@media only screen and (min-width: 768px) { | |
.tribe-block__venue.tribe-block__venue--has-map .tribe-block__venue__map { | |
width: 62%; | |
} | |
} | |
.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-day__event ~ .tribe-events-calendar-day__event { | |
float:left; | |
width: 50%; | |
} | |
.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-day__event-details { | |
width: calc(var(--tec-grid-width-1-of-8)*8); | |
} | |
.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-day__time-separator + .tribe-events-calendar-day__event, | |
.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-day__type-separator + .tribe-events-calendar-day__event { | |
margin-top: var(--tec-spacer-9); | |
} | |
.postid-1521 .tribe-events-before-html, | |
.tribe-common--breakpoint-medium.tribe-events .tec-buy-ticket-mobile { | |
display: none; | |
} | |
.tribe-common .tribe-events-before-html h2 { | |
margin-bottom:var(--tec-spacer-4); | |
} | |
.tribe-events-view.tribe-events .tribe-events-header { | |
margin-top: var(--tec-spacer-6); | |
} | |
.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-day__event::before { | |
width: auto; | |
} | |
.tribe-events-calendar-day__time-separator, | |
.tribe-events-c-subscribe-dropdown { | |
clear:both; | |
} | |
.tribe-events-c-small-cta__price { | |
display:none; | |
} | |
.tribe-block__venue { | |
padding: 15px 0; | |
} | |
.tribe-block__venue .tribe-block__venue__meta { | |
margin-bottom: 0; | |
} | |
.tribe-block__venue .tribe-block__venue__meta .tribe-block__venue__name h3 { | |
font-size: var(--tec-font-size-5); | |
} | |
.tribe-block__organizer__details { | |
margin-bottom: 0; | |
padding: 15px 0; | |
} | |
#legend_box { | |
font-size: 16px; | |
} | |
.tribe-block__organizer__details h3 { | |
font-size: var(--tec-font-size-5); | |
} | |
.tribe-blocks-editor .event-tickets .tribe-tickets__rsvp-wrapper { | |
max-width: none; | |
} | |
.tribe-events-view:before, | |
.tribe-events-view:after { | |
content: ""; | |
display: table; | |
} | |
.tribe-events-view:after { | |
clear: both; | |
} | |
.tribe-events-view { | |
zoom: 1; /* For IE 6/7 (trigger hasLayout) */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'tribe_template_html:events/v2/components/events-bar/views', '__return_empty_string' ); | |
add_filter( 'tribe_template_html:events/v2/day/nav', '__return_empty_string' ); | |
add_filter( 'tribe_template_include_html:events/v2/day/top-bar', '__return_empty_string' ); | |
add_filter( 'tribe_template_html:events/v2/day/event/cost', '__return_empty_string' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'tribe_event_label_singular', static function() { | |
return __( 'Talk', 'jp-custom' ); | |
} ); | |
add_filter( 'tribe_event_label_singular_lowercase', static function() { | |
return __( 'talk', 'jp-custom' ); | |
} ); | |
add_filter( 'tribe_event_label_plural', static function() { | |
return __( 'Talks', 'jp-custom' ); | |
} ); | |
add_filter( 'tribe_event_label_plural_lowercase', static function() { | |
return __( 'talks', 'jp-custom' ); | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'tribe_get_organizer', static function ( $organizer_html ) { | |
return esc_html__( 'Speaker: ', 'jp-conference' ) . $organizer_html; | |
}, 15 ); | |
add_filter( 'tribe_get_venue', static function ( $venue_html ) { | |
return esc_html__( 'Track: ', 'jp-conference' ) . $venue_html; | |
}, 15 ); | |
add_filter( 'tribe_template_html:tickets/v2/rsvp', static function( $html ) { | |
if ( ! is_user_logged_in() ) { | |
return ''; | |
} | |
$user_id = get_current_user_id(); | |
$attendee = tec_tc_attendees()->by_args( [ | |
'user_id' => $user_id, | |
'event_id' => 1521, | |
'status' => 'publish', | |
] )->first(); | |
// No Ticket sold for the main event. | |
if ( ! $attendee ) { | |
return ''; | |
} | |
return $html; | |
}, 15 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'template_redirect', static function() { | |
$context = tribe_context(); | |
if ( ! $context->is( 'tec_post_type' ) ) { | |
return; | |
} | |
$view = $context->get( 'view' ); | |
if ( empty( $view ) ) { | |
return; | |
} | |
$conference_day_url = tribe_events_get_url( [ 'eventDisplay' => 'day', 'eventDate' => '2022-01-10' ] ); | |
if ( 'single-event' === $view ) { | |
return; | |
} | |
if ( ! in_array( $view, [ 'single-event', 'day', 'default' ], true ) ) { | |
remove_filter( 'wp_redirect', [ tribe( 'events.views.v2.hooks' ), 'filter_redirect_canonical' ] ); | |
wp_redirect( $conference_day_url ); | |
exit; | |
} | |
$date = $context->get( 'event_date' ); | |
if ( '2022-01-10' !== $date ) { | |
remove_filter( 'wp_redirect', [ tribe( 'events.views.v2.hooks' ), 'filter_redirect_canonical' ] ); | |
wp_redirect( $conference_day_url ); | |
exit; | |
} | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'tribe_events_views_v2_view_day_repository_args', static function( $repository_args, $context, $view ) { | |
$repository_args['post__not_in'] = [ 1521 ]; | |
return $repository_args; | |
}, 15, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment