Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(dom767_get_option('show_featured_event')==true):
- $args = array('post_type' => 'ajde_events','meta_query' => array( array('key' => '_featured', 'value' => 'yes', )),);
- $loop = new WP_Query( $args );
- $arr_postIds = array();
- while ( $loop->have_posts() ) : $loop->the_post();
- $arr_postIds[$post->ID]['post_id'] = $post->ID;
- $arr_postIds[$post->ID]['end_date'] = gmdate('Y-m-d', get_post_meta( $post->ID, 'evcal_erow', true ));
- endwhile;
- if(isset($arr_postIds) && is_array($arr_postIds) && count($arr_postIds) > 0)
- {
- $columns = array_column($arr_postIds, 'end_date');
- array_multisort($columns, SORT_ASC, $arr_postIds);
- }
- //while ( $loop->have_posts() ) : $loop->the_post();
- foreach ($arr_postIds as $arr_postId) :
- $post->ID = $arr_postId['post_id'];
- ?>
- <?php
- $end_date = gmdate('Y-m-d', get_post_meta( $post->ID, 'evcal_erow', true ));
- if($end_date >= date('Y-m-d')):
- ?>
- <div class="event_banner_container">
- <div class="fetured-slider has-arrows">
- <div class="flex_container">
- <div class="banner-row">
- <?php get_template_part('templates/event-post/event_slider'); ?>
- <div class="banner-end-row">
- <!-- Event Top Banner Information in Templates-event-post-event_banner_cont.php -->
- <?php get_template_part('templates/event-post/event_banner_cont'); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <?php //endforeach;
- endforeach;
- wp_reset_postdata();
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement