-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
46 lines (39 loc) · 1022 Bytes
/
Copy pathindex.php
File metadata and controls
46 lines (39 loc) · 1022 Bytes
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
<?php get_header(); ?>
<!-- Começa código da página -->
<section class="cabecalho-index">
<div>
<h1><?php
if(get_the_archive_title() == 'Arquivos') {
echo 'blog';
} else {
the_archive_title();
}
?></h1>
</div>
</section>
<!-- post -->
<div class="container">
<?php
$archiveConteudo = new WP_Query(array(
'post_type' => is_archive() ? get_queried_object()->name : false,
'category_name' => htmlspecialchars($_GET["mat"]),
));
if($archiveConteudo->have_posts()){
while($archiveConteudo->have_posts()) {
$archiveConteudo->the_post();
?>
<div class="post-page">
<div class="grid-12">
<div class="info-index-material">
<a href="<?php the_permalink(); ?>"><h2><?php the_title(); ?></h2></a>
</div>
</div>
</div>
<?php }} else { ?>
<div class="imagem-sem-conteudo">
<img src="<?php echo get_template_directory_uri(); ?>/img/no-data-amico.svg" alt="">
</div>
<?php } ?>
</div>
<!-- Fecha while -->
<?php get_footer(); ?>