-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-posts.php
79 lines (61 loc) · 1.79 KB
/
content-posts.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
<?php
/**
* The default template for displaying content.
*
* Used for both single and index/archive/author/catagory/search/tag.
*
* @package Odin
* @since 2.2.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if(( has_post_thumbnail($post->ID) && ( 'equipe' != get_post_type() ) )){?>
<div class="post-lista-thumb">
<?php echo get_the_post_thumbnail($post->ID, 'thumb-blog-lista');?>
<header class="entry-header titulo-post">
<a href="<?php echo get_permalink()?>">
<?php the_title( '<h2 class="entry-title ">', '</h2>' );?>
</a>
</header><!-- .entry-header -->
<div class="data-post">
<h3><?php the_time( 'd/' ); ?></h3>
<h4><?php the_time( 'm/y' ); ?> </h4>
</div>
</div>
<?php }
else { ?>
<header class="entry-header titulo-post">
<a href="<?php echo get_permalink()?>">
<?php the_title( '<h2 class="entry-title ">', '</h2>' );?>
</a> </header><!-- .entry-header -->
<div class="data-post">
<h3><?php the_time( 'd/' ); ?></h3>
<h4><?php the_time( 'm/y' ); ?> </h4>
</div>
<?php }?>
<div class="page-content">
<?php
if (is_single()){
echo apply_filters( 'the_content', get_the_content() );
comments_template();
}
else{
echo get_the_posts_excerpt();
echo '<a href="'.get_permalink().'"> - <b>Leia mais...</b></a>';
}?>
<?php
echo '<hr>';
$count =0;
$post_categories = wp_get_post_categories($post->ID );
$cats = array();
foreach($post_categories as $c){
$cat = get_category( $c );
if ($count!=0){
echo ' <span>●</span> ';
}
echo '<span>'.$cat->name.'</span>';
$count++;
}
?>
</div><!-- #page-content -->
</article><!-- #post-## -->