archive page added

This commit is contained in:
magepeopleteam 2021-12-14 04:32:55 +00:00
parent 758937975c
commit 1fb418048c
2 changed files with 33 additions and 0 deletions

View File

@ -374,6 +374,16 @@ function mep_get_event_ticket_price_by_name($event, $type) {
}
}
add_filter( 'archive_template', 'mep_load_default_event_archive_template');
if (!function_exists('mep_load_default_event_archive_template')) {
function mep_load_default_event_archive_template($template){
if ( is_post_type_archive ( 'mep_events' ) ) {
$template = mep_template_file_path('event-archive.php');
}
return $template;
}
}
if (!function_exists('mep_get_ticket_price_by_event')) {
function mep_get_ticket_price_by_event($event, $type, $default_price = 0) {
$ticket_type = get_post_meta($event, 'mep_event_ticket_type', true);

View File

@ -0,0 +1,23 @@
<?php
get_header();
the_post();
do_action('mep_event_single_page_after_header');
?>
<div class="mep-events-wrapper">
<div class='mep_event_list'>
<div class='mage_grid_box'>
<?php
$loop = mep_event_query(18, 'ASC', '', '', '', '', 'upcoming');
while ($loop->have_posts()) {
$loop->the_post();
do_action('mep_event_list_shortcode', get_the_id(), 'three_column', 'grid');
}
wp_reset_postdata();
mep_event_pagination($loop->max_num_pages);
?>
</div>
</div>
</div>
<?php
do_action('mep_event_single_page_before_footer');
get_footer();