-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-upcoming-events.php
43 lines (42 loc) · 1.02 KB
/
page-upcoming-events.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
Template Name: up-coming-events
*/
get_header();
?>
<main>
<?php if ( have_posts() ) : ?>
<section class="events-page">
<!-- echo page content -->
<?php
while ( have_posts() ) : the_post();
the_title('<h1>', '</h1>');
the_content();
endwhile;
?>
<!-- query posts of category event -->
<?php
query_posts(array(
'category_name' => 'event'
));
?>
<!-- post list -->
<div class="event-list">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" class="first-event upcoming-event-card">
<?php get_template_part( 'template/page/common_cover', get_post_format()); ?>
<?php get_template_part( 'template/page/event_card', get_post_format()); ?>
</article>
<?php endwhile; ?>
</div>
</section>
<?php wp_reset_postdata(); ?>
<?php else: ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php
endif;
get_template_part( 'template/auth/sign-up', get_post_format());
?>
</main>
<?php
get_footer();