Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Ticket #18112
- // Template: /themes/avataroceania/template-without-thoughtstorm-event.php
- // Page URL: https://www.avataroceania.com/schedule/
- // Compare to page: https://www.avataroceania.com/events/
- // ===== NEW Codes: =====
- <?php
- global $post;
- // Retrieve the next 5 upcoming events
- $this_month = date( "Y-m-01 00:00", strtotime("now") );
- $events = tribe_get_events( [
- 'tribe_events_cat' => '55,56,54',
- //'start_date' => 'now',
- 'start_date' => $this_month,
- 'posts_per_page' => -1,
- ] );
- // Loop through the events: set up each one as
- // the current post then use template tags to
- // display the title and content
- $setvalCon = "";
- foreach ( $events as $post ) {
- setup_postdata( $post );
- // This time, let's throw in an event-specific
- // template tag to show the date after the title!
- //echo '<h4 class="tribe-events-list-event-title">' . $post->post_title . '</h4>';
- //echo ' ' . tribe_get_start_date( $post ) . ' ';
- //the_post_thumbnail('full');
- //echo the_excerpt();
- $date = tribe_get_event($post);
- ?>
- <?php if( strtotime($date->end_date) > strtotime('now') ) { ?>
- <div class="content_sec">
- <div class="content_con">
- <?php
- if( $setvalCon != substr($post->event_date,0, 7)){
- ?>
- <div class="post_month"><?php echo ' ' . tribe_events_list_the_date_headers( $post ) . ' '; ?></div>
- <?php
- }
- $setvalCon = substr($post->event_date,0, 7);
- ?>
- <h3><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h3>
- <div class="tribe-event-schedule-details"><?php echo tribe_events_event_schedule_details(); ?></div>
- <div class="tribe-events-venue-details"><?php echo ' ' . tribe_get_venue( $post ) . ' '; ?></div>
- <h3><?php get_the_category();?></h3>
- <div class="content_img">
- <a href="<?php the_permalink();?>"><?php the_post_thumbnail('full'); ?></a>
- </div>
- <div class="post_content"><?php the_excerpt(); ?></div>
- <div class="read_more">
- <a class="btn btn-light-yellow appointment-btn" href="<?php the_permalink(); ?>">Find out more »</a>
- </div>
- </div>
- </div>
- <?php } ?>
- <?php } ?>
- // ===== OLD Codes: =====
- <?php
- global $post;
- // Retrieve the next 5 upcoming events
- $events = tribe_get_events( [
- 'tribe_events_cat' => '55,56,54',
- 'start_date' => 'now',
- 'posts_per_page' => -1,
- ] );
- // Loop through the events: set up each one as
- // the current post then use template tags to
- // display the title and content
- $setvalCon = "";
- foreach ( $events as $post ) {
- setup_postdata( $post );
- // This time, let's throw in an event-specific
- // template tag to show the date after the title!
- //echo '<h4 class="tribe-events-list-event-title">' . $post->post_title . '</h4>';
- //echo ' ' . tribe_get_start_date( $post ) . ' ';
- //the_post_thumbnail('full');
- //echo the_excerpt(); ?>
- <div class="content_sec">
- <div class="content_con">
- <?php
- if( $setvalCon != substr($post->event_date,0, 7)){
- ?>
- <div class="post_month"><?php echo ' ' . tribe_events_list_the_date_headers( $post ) . ' '; ?></div>
- <?php
- }
- $setvalCon = substr($post->event_date,0, 7);
- ?>
- <h3><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h3>
- <div class="tribe-event-schedule-details"><?php echo tribe_events_event_schedule_details(); ?></div>
- <div class="tribe-events-venue-details"><?php echo ' ' . tribe_get_venue( $post ) . ' '; ?></div>
- <h3><?php get_the_category();?></h3>
- <div class="content_img">
- <a href="<?php the_permalink();?>"><?php the_post_thumbnail('full'); ?></a>
- </div>
- <div class="post_content"><?php the_excerpt(); ?></div>
- <div class="read_more">
- <a class="btn btn-light-yellow appointment-btn" href="<?php the_permalink(); ?>">Find out more »</a>
- </div>
- </div>
- </div>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement