-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-material.php
82 lines (74 loc) · 2.33 KB
/
content-material.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
<div class="col-sm-3 item animated fadeIn">
<div class=' item-imagem'>
<?php $tipo = get_field('tipo');
$dataAttr="";
switch ($tipo) {
case "Link":
$link=get_field('link_material')['url'];
?>
<a target="_blank" href="<?php echo $link;?>">
<?php the_post_thumbnail('full', array('class' => "thumb"));?>
<img class="tipo animated fadeIn" src="<?php echo get_template_directory_uri(); ?>/assets/images/icon-link.png">";
</a>
<?php
break;
case "PDF":
$link=get_field('pdf');?>
<a target="_blank" href="<?php echo $link;?>">
<?php the_post_thumbnail('full', array('class' => "thumb"));?>
<img class="tipo animated fadeIn" src="<?php echo get_template_directory_uri(); ?>/assets/images/icon-pdf.png">";
</a>
<?php
break;
case "Vídeo":
$link="#";#;
$video=get_field("video");
$videos[$post->ID]=$video->html;
?>
<a class="link-video-material" data-postID="<?php echo $post->ID?>" href="#">
<?php the_post_thumbnail('full', array('class' => "thumb link-video-material"));?>
<img class="link-video-material tipo animated fadeIn" src="<?php echo get_template_directory_uri(); ?>/assets/images/icon-video.png">";
</a>
<?php
break;
}
?>
</div>
<div class=" item-descricao">
<div class="resumo animated fadeIn">
<a href="<?php echo $link;?>">
<?php echo get_the_excerpt();?>
</a>
</div>
<div class="item-titulo animated fadeIn">
<a href="<?php echo $link;?>">
<?php echo get_the_title();?>
</a>
</div>
<div class="item-autor animated fadeIn">
<?php
$term_list = wp_get_post_terms($post->ID, 'autor', array("fields" => "all"));
foreach ($term_list as $term){
echo $term->name;
if ($term !== end($term_list)){
echo ', ';
}
}
?>
</div>
<div class="item-tema animated fadeIn">
<?php
// $term_list = wp_get_post_terms($post->ID, 'tema', array("fields" => "all"));
// foreach ($term_list as $term){
// echo $term->name;
// if ($term !== end($term_list)){
// echo ', ';
// }
// }
?>
</div>
</div>
<?php
?>
</a>
</div><!-- cada escola -->