-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-exposiciones.php
116 lines (96 loc) · 2.55 KB
/
page-exposiciones.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
<?php
/*
* Template Name: Exposiciones
*/
get_header(); ?>
<div class="heading list">
<div>
<h3>EXPOSICIONES: </h3>
<ul class="dropdown">
<li>
<h1>Actuales</h1>
<ul>
<li><a href="<?php echo esc_url( home_url( '/exposiciones/' ) ); ?>">Actuales</a></li>
<li><a href="<?php echo esc_url( home_url( '/exposiciones/exposiciones-futuras/' ) ); ?>">Futuras</a></li>
<li><a href="<?php echo esc_url( home_url( '/exposiciones/archivo-de-exposiciones/' ) ); ?>">Archivo</a></li>
</ul>
</li>
</ul>
</div>
</div>
<section id="events-post">
<h2 class="wrap">Exposiciones Permanentes</h2><?php
$args = array(
'post_type' => 'post',
'meta_value' => 'Permanente'
);
$exPerm = new WP_Query( $args );
if ( $exPerm->have_posts() ) {
echo '<ul class="permanents masonry cards">';
while ( $exPerm->have_posts() ) { $exPerm->the_post();
$image = get_post_thumbnail_id( $post_id );
$img_med = wp_get_attachment_image_src($image, 'medium'); ?>
<li>
<a href="<?php the_permalink(); ?>">
<div class="feature-img">
<img src="<?php echo $img_med[0]; ?>" atl="3 museos">
</div>
<div class="description">
<h1><?php the_title(); ?></h1>
<?php if(get_field('schedule')){ echo '<p>'.get_field('schedule').'</p>'; }?>
</div>
</a>
</li>
<?php
}
echo '</ul>';
}
?></section>
<section id="events-post">
<h2 class="wrap">Exposiciones Temporales</h2>
<?php
$args = array(
'post_type' => 'post',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'expo_status',
'value' => 'Temporal'
),
array(
'key' => 'temporal',
'value' => 'actual'
),
)
);
$exPerm = new WP_Query( $args );
if ( $exPerm->have_posts() ) {
echo '<ul class="masonry cards">';
while ( $exPerm->have_posts() ) { $exPerm->the_post();
$image = get_post_thumbnail_id( $post_id );
$img_med = wp_get_attachment_image_src($image, 'medium');
get_template_part('inc/cards'); /* ?>
<li>
<a href="<?php the_permalink(); ?>">
<div class="feature-img">
<img src="<?php echo $img_med[0]; ?>" atl="3 museos">
</div>
<div class="description">
<h1><?php the_title(); ?></h1><?php
if(get_field('museum')){
echo '<p>'.get_field('museum');
}
if(get_field('end_time')) {
get_template_part('funct/expodate');
} else {
echo '</p>';
} ?>
</div>
</a>
</li>
<?php */
}
echo '</ul>';
}
?></section>
<?php get_footer(); ?>