-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconoce.php
205 lines (179 loc) · 7.28 KB
/
conoce.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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<?php
/**
* Template Name: Conoce
* @package WordPress
* @subpackage Inspira
* @since Inspira 0.1
*/
get_header(); ?>
<section class="conoce-intro"><div class="contents">
<?php
$projects = get_terms('project', array(
hide_empty => '0'
));
if ($projects) { ?>
<ul class="categorias-logros">
<?php foreach ($projects as $project ) {
$image = get_field('logo', $project)['sizes']['conoce-intro-logo'];
$subtitle = get_field('subtitle', $project);
?>
<li class="<?php echo $project->slug; ?>">
<div class="text">
<strong><?php echo $project->name; ?></strong>
<span><?php echo $subtitle; ?></span>
</div>
<div class="conts">
<h1><img src="<?php echo $image; ?>" alt="" /></h1>
<?php echo $project->description; ?>
</div>
</li>
<?php } ?>
</ul>
<?php }
?>
<div class="categorias-logros-content">
<strong class="note">« Da click en los círculos para conocer nuestros proyectos.</strong>
</div>
<?php
if ($projects) { ?>
<div class="categorias-logros-content-alt">
<?php foreach ($projects as $project ) {
$image = get_field('logo', $project)['sizes']['conoce-intro-logo'];
$subtitle = get_field('subtitle', $project);
?>
<div class="conts">
<h1><img src="<?php echo $image; ?>" alt="" /></h1>
<?php echo $project->description; ?>
</div>
<?php } ?>
</div>
<?php }
?>
</div></section>
<section class="conoce-logros pagination-wrap"><div class="contents">
<h1>Algunos Logros Inspiradores</h1>
<div class="pagination-filter">
<label class="styled-select year">
<span class="text">Año</span>
<span class="select-wrap">
<?php
wp_dropdown_categories( array(
'show_option_all' => 'Todos ',
'taxonomy' => 'logro_year',
'class' => 'logro_year',
'value_field' => 'slug'
) );
?>
</span>
</label>
<label class="styled-select project">
<span class="text">Proyecto</span>
<span class="select-wrap">
<?php
wp_dropdown_categories( array(
'show_option_all' => 'Todos',
'taxonomy' => 'project',
'class' => 'project',
'value_field' => 'slug'
) );
?>
</span>
</label>
</div>
<div class="pagination-results">
<?php
$paged = get_query_var('paged', 1);
$args = array(
'post_type' => 'inspira_logros',
'post_status' => 'publish',
'order' => 'desc',
'posts_per_page' => 12,
'orderby' => 'rand',
'paged' => $paged,
'logro_year' => get_query_var('logro_year'),
'project' => get_query_var('project'),
);
query_posts($args); ?>
<ul class="logros">
<?php while (have_posts()) : the_post();
$image = get_field('imagen');
?>
<li>
<?php if( !empty($image) ): ?>
<img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php endif; ?>
<span class="info">
<strong><?php the_title(); ?></strong>
<?php echo get_field('estadisticas'); ?>
</span>
<span class="meta">
<em class="proyecto"><?php
$projects = get_the_terms( $post->ID, 'project' );
foreach($projects as $taxindex => $taxitem) {
echo $taxitem->name;
}
?></em>
<em class="ciudad"><?php
$centros = get_the_terms( $post->ID, 'centros' );
if ($centros) {
$centro = array_values($centros)[0];
$estado = get_field('estado', $centro);
echo $estado;
}
?></em>
<em class="year"><?php
$year = get_the_terms( $post->ID, 'logro_year' );
foreach($year as $taxindex => $taxitem) {
echo $taxitem->name;
}
?></em>
</span>
</li>
<?php endwhile; ?>
</ul>
<div class="pagination-triggers">
<span class="prev"><?php next_posts_link('Anterior ...') ?></span>
<span class="next"><?php previous_posts_link('Siguiente ...') ?></span>
</div>
<?php wp_reset_query(); ?>
</div>
</div></section>
<section class="conoce-participa"><div class="contents">
<h1>
<strong>Participa</strong> en nuestras
<br />
<strong>próximas</strong> actividades
</h1>
<ul>
<li class="cursos"><a href="<?php echo get_permalink( get_page_by_path('participa') ); ?>#proximos-eventos">
Cursos
</a></li>
<li class="eventos"><a href="<?php echo get_permalink( get_page_by_path('participa') ); ?>#proximos-eventos">
Eventos
</a></li>
<li class="voluntariado"><a href="<?php echo get_permalink( get_page_by_path('contribuye') ); ?>">
Voluntariado
</a></li>
</ul>
</div></section>
<section class="conoce-imagen"><div class="contents">
<h1>
Una imagen dice más
<small>que mil palabras</small>
</h1>
<figure>
<?php putRevSlider( 'youtube-gallery2' ); ?>
</figure>
</div></section>
<section class="conoce-banner"><div class="contents">
<div class="content">
<blockquote>
Hay que
<strong>moverse</strong>
<span class="puedes">en la dirección</span>
<strong class="lograr">de los sueños</strong>
</blockquote>
<p class="author">Lidia Pérez</p>
</div>
</div></section>
<?php get_footer(); ?>