-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.php
147 lines (138 loc) · 5.9 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php
/**
* Paperplane _blankTheme - template predefinito per pagine.
*/
get_header();
?>
<?php
while ( have_posts() ) : the_post();
//current_page_from_single_cpt();
$my_id = get_the_ID();
$post_type = get_post_type();
// verifico scadenze bando
if ( get_field( 'scadenza_bando' ) ) {
$scadenza_bando = get_field( 'scadenza_bando' );
global $today;
if ( $scadenza_bando < $today ) {
$scadenza_check = 'scaduto';
}
else {
$scadenza_check = 'non_scaduto';
}
}
?>
<main class="wrapper">
<div class="wrapper-padded">
<div class="wrapper-padded-intro">
<div class="single-content-opening-padder">
<div class="breadcrumbs-holder grey-links undelinked-links" typeof="BreadcrumbList" vocab="http://schema.org/">
<?php bcn_display(); ?>
</div>
<div class="flex-hold flex-hold-page-opening">
<div class="page-opening-left printable">
<h1><?php the_title(); ?></h1>
<?php if ( get_field( 'page_abstract' ) ) : ?>
<p class="paragraph-variant">
<?php the_field( 'page_abstract' ); ?>
</p>
<?php endif; ?>
<?php if( has_term( 'bandi', 'documenti_tax' ) ) : ?>
<?php
$pubblicazione_bando = get_field( 'pubblicazione_bando' );
$giorno_pubblicazione = date_i18n( 'j', strtotime( $pubblicazione_bando ) );
$mese_pubblicazione = date_i18n( 'F', strtotime( $pubblicazione_bando ) );
$anno_pubblicazione = date_i18n( 'Y', strtotime( $pubblicazione_bando ) );
$scadenza_bando = get_field( 'scadenza_bando' );
$giorno_scadenza = date_i18n( 'j', strtotime( $scadenza_bando ) );
$mese_scadenza = date_i18n( 'F', strtotime( $scadenza_bando ) );
$anno_scadenza = date_i18n( 'Y', strtotime( $scadenza_bando ) );
?>
<div class="more-info">
<p class="paragraph-variant">
<strong>Data pubblicazione:</strong> <?php echo $giorno_pubblicazione; ?> <?php echo $mese_pubblicazione; ?> <?php echo $anno_pubblicazione; ?><br />
<strong>Data scadenza:</strong> <?php echo $giorno_scadenza; ?> <?php echo $mese_scadenza; ?> <?php echo $anno_scadenza; ?>
</p>
</div>
<?php endif; ?>
<?php if ( $post_type === 'post' ) : ?>
<div class="data-holder paragraph-variant-holder">
<p>
Data: <?php echo get_the_date( 'j F Y' ); ?>
</p>
</div>
<?php
$image_data = array(
'image_type' => 'post_thumbnail', // options: post_thumbnail, acf_field, acf_sub_field
'image_value' => '', // se utilizzi un custom field indica qui il nome del campo
'size_fallback' => 'full_desk'
);
$image_sizes = array( // qui sono definiti i ritagli o dimensioni. Devono corrispondere per numero a quanto dedinfito nella funzione nei parametri data-srcset o srcset
'retina' => 'full_desk_retina',
'desktop' => 'full_desk',
'mobile' => 'content_picture',
'micro' => 'micro'
);
print_theme_image( $image_data, $image_sizes );
?>
<?php else : ?>
<?php include( locate_template( 'template-parts/grid/intro-avvisi-warnings.php' ) ); ?>
<?php endif; ?>
</div>
<div class="page-opening-right no-print">
<div class="padder">
<?php include( locate_template( 'template-parts/grid/intro-actions.php' ) ); ?>
<?php list_argomenti_pills(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<div class="wrapper">
<div class="wrapper-padded">
<div class="wrapper-padded-more">
<?php if ( get_field( 'content_index' ) == 1 ) : ?>
<div class="flex-hold flex-hold-page-index">
<div class="page-index-left no-print">
<div class="sticky-element sticky-columns-js">
<button onclick="pageIndexMenuControls(this)" class="index-menu-expander index-menu-expander-js button-appearance-normalizer button-typo-normalizer" aria-expanded="true">
Indice della pagina<span class="icon-collapse-1"></span>
</button>
<div class="index-menu-js">
<ul class="index-listing">
<?php include( locate_template( 'template-parts/modules/modules-index-handler.php' ) ); ?>
</ul>
</div>
</div>
</div>
<div class="page-index-right">
<div class="padder">
<?php include( locate_template( 'template-parts/modules/modules-handler.php' ) ); ?>
<div class="module-separator">
<p class="paragraph-variant"><strong>
Ultimo aggiornamento<br />
<?php the_modified_time('d/m/Y, H:i'); ?>
</strong></p>
</div>
</div>
</div>
</div>
<?php else : ?>
<div class="wrapper-padded-more-780 modules-wrapper">
<div class="padder">
<?php include( locate_template( 'template-parts/modules/modules-handler.php' ) ); ?>
<div class="module-separator">
<p class="paragraph-variant"><strong>
Ultimo aggiornamento<br />
<?php the_modified_time('d/m/Y, H:i'); ?>
</strong></p>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>