forked from PorteAperteSulWeb/pasw2015
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page_norightside.php
69 lines (62 loc) · 2.41 KB
/
page_norightside.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
<?php
/*
Template Name: Pagina senza B.L. 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="lastmodified">
Ultima modifica: <?php the_modified_date('j F Y'); ?>
</div>
<h2 class="posttitle"><?php the_title(); ?></h2>
<?php $children = wp_list_pages('depth=1&title_li=&child_of='.$post->ID."&echo=0");
if($children){ ?>
<div class="sotto-pagine">
<ul>
<?php wp_list_pages('depth=1&title_li=&child_of='.$post->ID); ?>
</ul>
</div>
<?php if (get_option( 'pasw_submenu') == '2') { echo '<div class="clear"></div>';
}
}?>
<div class="postentry">
<?php the_content(__('Leggi il resto »')); ?>
</div>
</div>
<?php endwhile; } ?>
<?php
$TitoloPagina=$post->post_title;
if ( get_post_meta($post->ID, 'usrlo_pagina_categoria', true)!=-1 ) {
$categoria_pagina = get_post_meta($post->ID, 'usrlo_pagina_categoria', true);
if(isset($categoria_pagina)){
echo '<div class="clear"></div>
<div class="pagecat">';
$category_link = get_category_link( $categoria_pagina );
echo '<a style="float:right;padding: 20px;" href="' . esc_url( $category_link ) . '" title="Tutte le ' . get_cat_name( $categoria_pagina) . '">Visualizza tutto »</a>';
echo '<h3>Ultimi 5 articoli pubblicati in "' . strtolower ( get_cat_name( $categoria_pagina)) . '"</h3>';
global $post;
$myposts = get_posts('numberposts=5&category='.$categoria_pagina);
foreach($myposts as $post) :
setup_postdata($post);
global $more;
$more = 0;
?>
<h4><font class="hdate"><?php the_time('j F Y') ?></font> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<?php the_excerpt();
endforeach;
echo '</div>';
}
}
?>
</div>
<?php
get_footer();
?>