-
Notifications
You must be signed in to change notification settings - Fork 21
/
single-custom-2.php
80 lines (71 loc) · 2.51 KB
/
single-custom-2.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
/*
Modello di pubblicazione: Carta intestata senza barra dx
*/
?>
<?php get_header(); ?>
<?php get_sidebar(); ?>
<style>
#centrecontent {
width: 77%;
}
</style>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="postentry">
<div class="avviso box-shadow-br">
<?php
$post_title = $post->post_title;
$post_header = html_entity_decode(get_option('pasw_post_tpl_header'));
$post_sign = html_entity_decode(get_option('pasw_post_tpl_sign'));
//$content = html_entity_decode($post->post_content);
$content = get_the_content();
$result = '';
if($post_header){
$result .= $post_header . '<hr>';
}
$content = preg_replace('#Oggetto:#is', '<strong>Oggetto </strong>: '.$post_title , $content);
$result .= '<div class="content">'. $content;
if($post_sign) {
$result .= '<div class="sign">' . $post_sign . '</div>';
}
$result .= '</div>';
$content = apply_filters('the_content', $result);
echo $content;
?>
<?php wp_link_pages(); ?>
<div class="footer">
<hr>
<?php if (!is_page()) { ?>
<p>Data di pubblicazione: <?php the_time('j F Y') ?><br />
<?php
if (get_post_type() == 'post') {
echo 'Contenuto in: '; the_category(', ');
} else { echo '<br/>'; }
?>
<?php $posttags = get_the_tags($post->ID);
if ($posttags) { ?>
<span><br />Tag:</span>
<?php
foreach($posttags as $tag) {
echo '<a href="';
echo get_tag_link($tag);
echo '">';
echo $tag->name . '';
echo '</a> ';
}
}
?>
<?php } ?></p>
</div>
</div>
</div>
</div>
<?php endwhile; else : ?>
<h2><?php _e('Non trovato'); ?></h2>
<p><?php _e('Spiacenti, ma la pagina richiesta non � stata trovata.'); ?></p>
<?php endif; ?>
</div>
<?php
get_footer();
?>