-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-npd.php
executable file
·157 lines (134 loc) · 7.32 KB
/
single-npd.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
<?php get_header(); ?>
<!-- Get the banner to display -->
<?php get_template_part( 'template-parts/bannerHeader' ); ?>
<?php if ($post->post_parent > 0): ?>
<?php $ancestors = get_post_ancestors(get_the_ID()); ?>
<div class="row justify-content-center max-large px-4 px-md-0 no-gutters">
<div class="col-md-11">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<?php foreach ($ancestors as $ancestor): ?>
<li class="breadcrumb-item"><a href="<?php echo get_permalink($ancestor); ?>"><?php echo get_the_title($ancestor); ?></a></li>
<?php endforeach; ?>
<li class="breadcrumb-item active" aria-current="page"><?php the_title(); ?></li>
</ol>
</nav>
</div>
</div>
<?php endif; ?>
<main role="main" class="mt-5 max-large px-4 px-md-0">
<div class="row justify-content-md-center">
<div class="col-md-11">
<?php get_template_part('template-parts/loop', 'singular'); ?>
</div>
</div>
<div class="npds-list">
<div class="row justify-content-md-center">
<div class="col-md-11">
<?php
$children = get_children([
'post_parent' => get_the_ID(),
'post_type' => 'npd',
'numberposts' => -1,
]);
?>
<?php foreach($children as $child): ?>
<div class="npds-list__item">
<div class="tainacan-title">
<div class="border-bottom mb-5 border-jelly-bean tainacan-title-page" style="border-width: 2px !important;">
<ul class="list-inline mb-1">
<li class="list-inline-item text-midnight-blue font-weight-bold title-page">
<a href="<?php echo get_permalink($child->ID); ?>"><?php echo $child->post_title; ?></a>
</li>
<!-- <li class="list-inline-item float-right title-back"><a href="javascript:history.go(-1)"><?php _e('Back', 'tainacan-theme'); ?></a></li> -->
</ul>
</div>
</div>
<div class="row justify-content-md-center">
<div class="col-md-8">
<p><?php echo wp_trim_words($child->post_content, 60); ?></p>
<div class="npds-list__read-more">
<a href="<?php echo get_permalink($child->ID); ?>">Leia mais...</a>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<?php if ($post->post_parent == 0): ?>
<?php npds_the_events(); ?>
<div class="row justify-content-md-center">
<div class="col-md-11">
<div class="box-contato">
<div class="tainacan-title">
<div class="border-bottom mb-5 border-jelly-bean tainacan-title-page" style="border-width: 2px !important;">
<ul class="list-inline mb-1">
<li class="list-inline-item text-midnight-blue font-weight-bold title-page">
Contato
</li>
<!-- <li class="list-inline-item float-right title-back"><a href="javascript:history.go(-1)"><?php _e('Back', 'tainacan-theme'); ?></a></li> -->
</ul>
</div>
</div>
<div class="row justify-content-center">
<div class="col-12 col-lg-8">
<div class="row justify-content-between">
<div class="col-md-5">
<dl>
<dt>Telefones</dt>
<dd><?php echo get_post_meta(get_the_ID(), '_mapas_telefonePublico', true); ?></dd>
<dt>Endereço</dt>
<dd><?php echo get_post_meta(get_the_ID(), '_mapas_endereco', true); ?></dd>
<dt>Correio Eletrônico</dt>
<?php $linkEmail = get_post_meta(get_the_ID(), '_mapas_emailPublico', true); ?>
<dd><a href="mailto:<?php echo $linkEmail; ?>"><?php echo $linkEmail; ?></a></dd>
<dt>Blog</dt>
<?php $linkBlog = get_post_meta(get_the_ID(), '_mapas_site', true); ?>
<dd><a href="<?php echo $linkBlog; ?>"><?php echo $linkBlog; ?></a></dd>
<dt>Facebook</dt>
<?php $linkFace = get_post_meta(get_the_ID(), '_mapas_facebook', true); ?>
<dd><a href="<?php echo $linkFace; ?>"><?php echo $linkFace; ?></a></dd>
</dl>
</div>
<div class="col-md-6">
<h3 class="title-1 title-1--no-border">Mande sua mensagem</h3>
<form class="form-style form-validar" action="#" method="post">
<fieldset>
<legend>Formulário de contato</legend>
<div class="linha">
<label for="contato-nome">Nome</label>
<input type="text" id="contato-nome" class="obrigatorio">
</div>
<div class="linha">
<label for="contato-email">E-mail</label>
<input type="text" id="contato-email" class="obrigatorio-email">
</div>
<div class="linha">
<label for="contato-assunto">Assunto</label>
<input type="text" id="contato-assunto" class="obrigatorio">
</div>
<div class="linha">
<label for="contato-mensagem">Escreva sua mensagem aqui.</label>
<textarea id="contato-mensagem" cols="30" rows="10" class="obrigatorio"></textarea>
</div>
<div class="linha">
<input type="submit" value="Enviar">
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
</main>
<script>
moverLabels();
validarFormulario();
</script>
<?php get_footer(); ?>