-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-fonte.php
executable file
·63 lines (51 loc) · 1.12 KB
/
content-fonte.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
<div class="cada-publicacao-archive col-sm-6">
<div class="col-md-9 titulo-publicacao-archive">
<?php the_title( '<h4>', '</h4>' );
?>
<?php
the_content( );
$emails=explode(',', get_field('email'));
// print_r($emails);
$count=count($emails);
foreach ($emails as $email) {?>
<a href="mailto:<?php
$email = preg_replace('/\s+/', '', $email);
echo $email?>">
<?php
echo $email;
?>
</a>
<?php if ($count > 1 ){
echo ",";
}
$count--;
}
echo "<br>";
if( get_field('telefone') ): ?>
<p>☎ <?php the_field('telefone'); ?></p>
<?php endif; ?>
<?php
// print_r($post);
$terms = get_the_terms($post->ID, 'tema_fonte');
// get_terms([
// 'taxonomy' => "tema_fonte",
// ]);
if ($terms){
$count=count($terms);
foreach ($terms as $term) {
?>
<a href="<?php echo get_term_link($term->term_id);?>"><?php echo $term->name;
if ($count > 1){
echo ", ";
$count--;
}
}
}
?>
</a>
</p>
<?php
?>
</p>
</div>
</div><!--cada-slide-2-->