-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
72 lines (65 loc) · 2.17 KB
/
content.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
<?php
/**
* @package WordPress
* @subpackage Yoko-Webdebs
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-details">
<?php if( in_category( 'eventi' ) ) : ?>
<span class="tag">Evento</span>
<?php elseif( in_category( 'incontri' ) ) : ?>
<span class="tag">Incontro</span>
<?php endif; ?>
<p>
<?php
if (in_category('eventi') || in_category('incontri')):
$when = get_post_meta($post->ID, 'Quando', true);
$where = get_post_meta($post->ID, 'Dove', true);
if ($when):
?>
<span>
<?php echo $when; ?>
</span>
<?php
endif;
if ($where):
?>
<span>
<?php echo $where; ?>
</span>
<?php
endif;
else:
?>
<span>
<?php echo get_the_date(); ?>
</span>
<?php
endif;
?>
</p>
</div><!-- end entry-details -->
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'yoko' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</header><!-- end entry-header -->
<div class="entry-content">
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. [use is_home() if you want to have the excerpt also in homepage ] ?>
<?php the_excerpt(); ?>
<?php else : ?>
<?php the_content( __( 'Continue Reading →', 'yoko' ) ); ?>
<?php endif; ?>
<?php if ( is_page() ) : // Display meta only on page post. ?>
<footer class="entry-meta">
<p><?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> |
<?php endif; ?>
<?php $tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ): ?>
<?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> |
<?php endif; ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Permalink ', 'yoko' ); ?></a>
</footer><!-- end entry-meta -->
<?php endif; ?>
</div><!-- end entry-content -->
</article><!-- end post-<?php the_ID(); ?> -->