-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharchive.php
More file actions
95 lines (79 loc) · 4.14 KB
/
archive.php
File metadata and controls
95 lines (79 loc) · 4.14 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
get_header();
//echo '<pre>';print_r($wp_query);exit;
?>
<section class="section-events section-events--white">
<div class="d-none d-lg-block section__social">
<div class="d-none d-lg-flex section__social__div">
<a href="#" title="facebook" class="icon-facebook" target="_blank"></a>
<a href="#" title="youtube" class="icon-youtube" target="_blank"></a>
<a href="#" title="linkedin" class ="icon-linkedin" target="_blank"></a>
<a href="#" title="twitter" class="icon-twitter" target="_blank"></a>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 col-lg-4">
<h2>News</h2>
</div>
<div class="offset-2 col-10 offset-lg-0 col-lg-8">
<div class="section-events-divInfoCima">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
<div class="no-events">
<p><b>No news added yet.</b></p>
<p>Stay tuned as we get ready for events!</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="offset-2 col-10 offset-md-0 col-md-6 col-lg-4">
</div>
<?php if($wp_query->posts){ ?>
<?php foreach($wp_query->posts as $item){ ?>
<article class="col-12 col-md-6 col-lg-4 div-card-dialogues">
<div class="card card-dialogues">
<div class="card-body">
<div class="card-text"><p>NEWS</p></div>
<div class="d-flex flex-column justify-content-between div-flexHeight">
<div>
<h5 class="card-title"><?php echo $item->post_title; ?></h5>
</div>
<div>
<?php if(get_field('date_custom_post', $item->ID)){ ?>
<div class="card-dialogues-info">
<p class="card-dialogues-type">DATE</p>
<p><?php echo get_field('date_custom_post', $item->ID); ?></p>
</div>
<?php } ?>
</div>
</div>
<a href="events-detail.php" class="icon-arrow"></a>
</div>
</div>
</article>
<?php } ?>
<?php } ?>
<?php if($wp_query->max_num_pages > 1){ ?>
<div class="d-flex justify-content-center">
<nav class="navigation pagination" aria-label="Posts">
<h2 class="screen-reader-text">Posts navigation</h2>
<div class="nav-links">
<?php if(!empty($_GET['page']) && $_GET['page'] != 1){?>
<a class="prev page-numbers" href="<?php echo get_post_type_archive_link('post'); ?>?page=<?php echo ($_GET['page'] - 1); ?>"><span class="icon icon-arrow"></span></a>
<?php } ?>
<?php for ($x = 1; $x <= $wp_query->max_num_pages; $x++) { ?>
<a class="page-numbers <?php echo (!empty($_GET['page']) && $_GET['page'] == $x ? 'current' : ''); ?>" href="<?php echo get_post_type_archive_link('post'); ?>page=<?php echo $x; ?>"><?php echo $x; ?></a>
<?php } ?>
<?php if(empty($_GET['page']) || (!empty($_GET['page']) && $_GET['page'] != $wp_query->max_num_pages)){?>
<a class="next page-numbers" href="<?php echo get_post_type_archive_link('post'); ?>page=<?php echo (!empty($_GET['page']) ? $_GET['page'] + 1 : 2); ?>"><span class="icon icon-arrow"></span></a>
<?php } ?>
</div>
</nav>
</div>
<?php } ?>
</div>
</div>
</section>
<?php
get_footer();