-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcategory.php
More file actions
140 lines (100 loc) · 3.02 KB
/
category.php
File metadata and controls
140 lines (100 loc) · 3.02 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php $eixo = get_category(get_query_var('cat')); ?>
<div class="eixos--description content">
<p><?php echo $eixo->description ?></p>
<hr style="margin: 20px 0;opacity: 0.5;">
<small><?php the_field('acf_eixo_english', $eixo); ?></small>
</div>
<hr>
<section class="eixos--projetos content">
<h2 class="display upper">Projetos</h2>
<div class="columns is-multiline">
<?php
$args = array ( 'category' => $eixo->cat_ID, 'posts_per_page' => 6, 'post_type' => 'projetos');
$myposts = get_posts( $args );
foreach( $myposts as $post ) :
setup_postdata($post);
?>
<article class="eixos--projeto column is-4">
<div>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('square-medium'); ?>
</a>
</div>
<div>
<h4><a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a></h4>
</div>
</article>
<?php endforeach; ?>
</div>
<div class="eixos--projetos-link">
<a class="display upper btn" href="/projetos/?eixo=<?php echo $eixo->slug ?>">Listar todos os projetos de <?php echo $eixo->name ?></a>
</div>
</section>
<div class="spacer"></div>
<div class="columns">
<!-- BLOG -->
<div class="column eixos--blog content">
<h2 class="display upper">Blog</h2>
<div class="spacer"></div>
<?php
$args = array ( 'category' => $eixo->cat_ID, 'posts_per_page' => 6, 'post_type' => 'blog');
$myposts = get_posts( $args );
foreach( $myposts as $post ) :
setup_postdata($post);
?>
<article class="eixos--blog-post columns">
<div class="column is-3">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('square-small'); ?>
</a>
</div>
<div class="column">
<h5 style="margin-bottom: 0.1em;">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h5>
<small><?php the_date(); ?></small>
</div>
</article>
<?php endforeach; ?>
</div>
<div class="column is-1"></div>
<!-- Eventos -->
<div class="column eixos--eventos content">
<h2 class="display upper">Eventos</h2>
<div class="spacer"></div>
<?php
$args = array ( 'category' => $eixo->cat_ID, 'posts_per_page' => 6, 'post_type' => 'eventos');
$myposts = get_posts( $args );
foreach( $myposts as $post ) :
setup_postdata($post);
?>
<article class="eixos--evento columns">
<div class="column is-3">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('square-small'); ?>
</a>
</div>
<div class="column">
<h5>
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h5>
</div>
</article>
<?php endforeach; ?>
</div>
</div>
<div class="columns">
<div class="column">
<a class="display upper btn" href="/blog/?eixo=<?php echo $eixo->slug ?>">Ver todos os posts de <?php echo $eixo->name ?></a>
</div>
<div class="column is-1"></div>
<div class="column">
<a class="display upper btn" href="/eventos/?eixo=<?php echo $eixo->slug ?>">Ver todos os eventos de <?php echo $eixo->name ?></a>
</div>
</div>