-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-page.php
executable file
·57 lines (47 loc) · 1.44 KB
/
content-page.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
<?php
/**
* The template used for displaying page content.
*
* @package Odin
* @since 2.2.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'odin' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php if ( in_array( 'categoria_noticias', get_object_taxonomies( get_post_type() ) ) ) : ?>
<?php
$lista_cat="";
$terms = wp_get_post_terms(get_the_id(), 'categoria_noticias');
// print_r($terms);
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
$count=0;
foreach ( $terms as $term ) {
if ($count==0) {
$lista_cat= '<a href="'.get_term_link($term,'categoria_noticias' ).'">'.$term->name.'</a>';
$count++;
}
else{
$lista_cat .= ', '.'<a href="'.get_term_link($term,'categoria_noticias' ).'">'.$term->name.'</a>';
}
}
?><span class="cat-links"><?php echo 'Categorias: ' . $lista_cat; ?></span>
<?php
}
// echo 'cat_lista'.$lista_cat;
?>
<?php endif; ?>
<?php
// the_tags( '<span class="cat-links">' . __( 'Tags:', 'odin' ) . ' ', ', ', '</span>' ); ?>
</footer>
</article><!-- #post-## -->