query_vars['post_type']) && $wp->query_vars['post_type'] == 'avcp') { if (have_posts()) { add_filter('the_content', 'avcp_job_cpt_template_filter'); } else { $wp_query->is_404 = true; } } } function avcp_job_cpt_template_filter($content) { global $wp_query; $jobID = $wp_query->post->ID; //echo get_post_meta(get_the_ID(), 'ammap_wysiwyg', true) . '
'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
CIG:' . get_post_meta(get_the_ID(), 'avcp_cig', true) . '
Struttura proponente:' . get_option('avcp_denominazione_ente') . '
' . get_option('avcp_codicefiscale_ente') . '
Oggetto del bando:' . get_the_title(get_the_ID()) . '
Procedura di scelta del contraente:' . get_post_meta(get_the_ID(), 'avcp_contraente', true) . '
Importo di aggiudicazione:' . get_post_meta(get_the_ID(), 'avcp_aggiudicazione', true) . '
Data di effettivo inizio:' . date("d F Y", strtotime(get_post_meta(get_the_ID(), 'avcp_data_inizio', true))) . '
Data di ultimazione:' . date("d F Y", strtotime(get_post_meta(get_the_ID(), 'avcp_data_fine', true))) . '
Importo delle somme liquidate:' . get_post_meta(get_the_ID(), 'avcp_somme_liquidate', true) . '
Anno di riferimento:'; $get_avcp_dis_archivioanni = get_option('avcp_dis_archivioanni'); if ($get_avcp_dis_archivioanni == '1') { echo strip_tags ( get_the_term_list( $post->ID, 'annirif', '', ' - ', '' ) ); } else { echo get_the_term_list( $post->ID, 'annirif', '', ' - ', '' ); } echo '
'; echo '

Elenco degli operatori partecipanti

'; echo ''; $terms = get_the_terms( $post->ID, 'ditte' ); if ($terms) { foreach($terms as $term) { $get_term = get_term_by('name', $term->name, 'ditte'); $t_id = $get_term->term_id; $term_meta = get_option( "taxonomy_$t_id" ); $term_return = esc_attr( $term_meta['avcp_codice_fiscale'] ); $stato_var = get_tax_meta($t_id,'avcp_is_ditta_estera'); if (empty($stato_var)) {$is_estera = 'IT';}else{$is_estera = 'EE';} echo ''; } } echo '
' . $term->name . ' ' . $term_return . ' - ' . $is_estera . '
'; echo '

Aggiudicatari

'; echo ''; global $post; $dittepartecipanti = get_the_terms( $post->ID, 'ditte' ); $cats = get_post_meta($post->ID,'avcp_aggiudicatari',true); if(is_array($dittepartecipanti)) { foreach ($dittepartecipanti as $term) { $cterm = get_term_by('name',$term->name,'ditte'); $cat_id = $cterm->term_id; //Prende l'id del termine $term_meta = get_option( "taxonomy_$cat_id" ); $term_return = esc_attr( $term_meta['avcp_codice_fiscale'] ); $checked = (in_array($cat_id,(array)$cats)? ' checked="checked"': ""); $stato_var = get_tax_meta($cat_id,'avcp_is_ditta_estera'); if (empty($stato_var)) {$is_estera = 'IT';}else{$is_estera = 'EE';} if ($checked) { echo ''; } } } echo '
' . $term->name . ' ' . $term_return . ' - ' . $is_estera . '
'; $get_avcp_showlove = get_option('avcp_showlove'); if ($get_avcp_showlove == '1') { echo '
Vista generata con il plugin AVCP XML per Wordpress
'; } } ?>