File: /home/slyfwmm/laretediclo/wp-content/themes/kicker-child/single-azienda.php
<?php
/**
* The template to display single post
*
* @package KICKER
* @since KICKER 1.0
*/
// Full post loading
$full_post_loading = kicker_get_value_gp( 'action' ) == 'full_post_loading';
// Prev post loading
$prev_post_loading = kicker_get_value_gp( 'action' ) == 'prev_post_loading';
$prev_post_loading_type = kicker_get_theme_option( 'posts_navigation_scroll_which_block' );
// Position of the related posts
$kicker_related_position = kicker_get_theme_option( 'related_position' );
// Type of the prev/next post navigation
$kicker_posts_navigation = kicker_get_theme_option( 'posts_navigation' );
$kicker_prev_post = false;
$kicker_prev_post_same_cat = kicker_get_theme_option( 'posts_navigation_scroll_same_cat' );
// Rewrite style of the single post if current post loading via AJAX and featured image and title is not in the content
if ( ( $full_post_loading
||
( $prev_post_loading && 'article' == $prev_post_loading_type )
)
&&
! in_array( kicker_get_theme_option( 'single_style' ), array( 'style-6' ) )
) {
kicker_storage_set_array( 'options_meta', 'single_style', 'style-6' );
}
do_action( 'kicker_action_prev_post_loading', $prev_post_loading, $prev_post_loading_type );
get_header(); ?>
<div class="post_header_wrap post_header_wrap_in_content post_header_wrap_style_style-12 with_featured_image">
<div class="post_header post_header_single entry-header">
<?php
$category = get_the_terms($post->ID, 'settori_aziende');
foreach($category as $single) {
if($single->parent == 0) {
$name3 = $single->name;
$id3 = $single->term_id;
}
if(is_string(get_term_link($single->parent))) {
$level2 = get_term($single->parent);
if(is_string(get_term_link($level2->parent))) {
$name1 = $single->name;
$id1 = $single->term_id;
} else {
$name2 = $single->name;
$id2 = $single->term_id;
}
}
}
?>
<div class="post_meta post_meta_categories">
<a href="/tutte-le-aziende/" rel="category tag">Aziende</a>
<?php if($name3) { echo ' > <a href="'.get_term_link($id3).'" rel="category tag">'.$name3.'</a>'; } ?>
<?php if($name2) { echo ' > <a href="'.get_term_link($id2).'" rel="category tag">'.$name2.'</a>'; } ?>
<?php if($name1) { echo ' > <a href="'.get_term_link($id1).'" rel="category tag">'.$name1.'</a>'; } ?>
</div>
<h1 class="post_title entry-title"><?php echo single_post_title(); ?></h1>
</div>
<div id="LRC_banner_article_before_content">
<div class="LRC_banner_desktop">
<?php echo pods('banner')->row['banner_before_content_desktop']; ?>
</div>
<div class="LRC_banner_tablet">
<?php echo pods('banner')->row['banner_before_content_tablet']; ?>
</div>
<div class="LRC_banner_mobile">
<?php echo pods('banner')->row['banner_before_content_mobile']; ?>
</div>
</div>
</div>
<div class="post_content post_content_single entry-content" itemprop="mainEntityOfPage">
<?php echo get_the_content(); ?>
<div id="LRC_company_card">
<?php
$LRCpod = pods();
$LRCpod_url = $LRCpod->display('url');
$LRCpod_controll = false;
if($LRCpod_url) {
$LRCpod_controll = true;
echo '<div><strong>Sito web:</strong> <a href="'.$LRCpod_url.'" target="_blank">'.$LRCpod_url.'</a></div>';
}
$LRCpod_email = $LRCpod->display('e_mail');
if($LRCpod_email) {
$LRCpod_controll = true;
echo '<div><strong>Email:</strong> <a href="mailto:'.$LRCpod_email.'">'.$LRCpod_email.'</a></div>';
}
$LRCpod_tel = $LRCpod->display('telefono');
if($LRCpod_tel) {
$LRCpod_controll = true;
echo '<div><strong>Telefono:</strong> <a href="tel:'.$LRCpod_tel.'">'.$LRCpod_tel.'</a></div>';
}
$LRCpod_fax = $LRCpod->display('fax');
if($LRCpod_fax) {
$LRCpod_controll = true;
echo '<div><strong>Fax:</strong> '.$LRCpod_fax.'</div>';
}
$LRCpod_indirizzo = $LRCpod->display('indirizzo');
$LRCpod_citta = $LRCpod->display('citta');
$LRCpod_cap = $LRCpod->display('cap');
$LRCpod_provincia = $LRCpod->display('provincia');
$LRCpod_regione = $LRCpod->display('regione');
if($LRCpod_indirizzo || $LRCpod_citta || $LRCpod_cap || $LRCpod_provincia || $LRCpod_regione) {
$LRCpod_controll = true;
echo '<div><strong>Indirizzo:</strong> ';
if($LRCpod_indirizzo) {
echo $LRCpod_indirizzo;
}
if($LRCpod_citta) {
if($LRCpod_cap) {
echo ' - '.$LRCpod_cap.' '.$LRCpod_citta;
} else {
echo ' - '.$LRCpod_citta;
}
}
if($LRCpod_provincia) {
echo ' ('.$LRCpod_provincia.')';
}
if($LRCpod_regione) {
echo ' | '.$LRCpod_regione;
}
echo '</div>';
}
$LRCpod_latlong = $LRCpod->display('lat_e_long');
if($LRCpod_latlong) {
$LRCpod_controll = true;
$LRCpod_latlong = explode(',',$LRCpod_latlong);
echo '<div><a class="LRC_link_map" href="https://www.google.com/maps/search/?api=1&query='.$LRCpod_latlong[1].','.$LRCpod_latlong[0].'" target="_blank">guarda sulla mappa</a></div>';
}
if($LRCpod_controll) {
echo '<div>Scheda azienda</div>';
}
?>
</div>
<div id="LRC_banner_article_after_content">
<div class="LRC_banner_desktop">
<?php echo pods('banner')->row['banner_after_content_desktop']; ?>
</div>
<div class="LRC_banner_mobile">
<?php echo pods('banner')->row['banner_after_content_mobile']; ?>
</div>
</div>
<div id="LRC_custom_tags">
<strong>Settori di interesse: </strong>
<?php
the_terms($post->ID, 'tag_aziende');
?>
</div>
</div>
<?php get_footer();