File: /home/slyfwmm/laretediclo/wp-content/themes/kicker-child/index.php
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: //codex.wordpress.org/Template_Hierarchy
*
* @package KICKER
* @since KICKER 1.0
*/
$kicker_template = apply_filters( 'kicker_filter_get_template_part', kicker_blog_archive_get_template() );
if ( ! empty( $kicker_template ) && 'index' != $kicker_template ) {
get_template_part( $kicker_template );
} else {
kicker_storage_set( 'blog_archive', true );
get_header(); ?>
<div class="elementor-widget-container LRC_title_category">
<h1 class="elementor-heading-title elementor-size-default"><?php
$category = get_category( get_query_var( 'cat' ) );
$taxonomy = $category->taxonomy;
$term_id = $category->term_id;
$LRC_title_custom_cat_title = get_field('titolo',$taxonomy . '_' . $term_id);
if(($LRC_title_custom_cat_title == NULL) || ($LRC_title_custom_cat_title === '')) {
single_cat_title();
} else {
echo $LRC_title_custom_cat_title;
}
if ( $paged > 1 ) { echo '<span style="font-size:0.65em;"> - pagina '.$paged.'</span>'; }
?></h1>
<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>
<?php
$LRC_title_archive = get_the_archive_title();
$LRC_title_archive_app = explode(':',$LRC_title_archive);
if(is_category()) {
echo '<p>Fisco e finanza, economia, lavoro, diritto: per affrontare ogni giorno le sfide del business è importante essere informati ed aggiornati.<br />
'.get_bloginfo( 'name' , 'raw' ).' è sicuramente il portale che fa per te: qui puoi trovare news ed approfondimenti e tutti gli strumenti per leggere in modo critico la realtà che ci circonda.</p><p>Ma '.get_bloginfo( 'name' , 'raw' ).' non è solo approfondimenti e news su diverse tematiche come '.$LRC_title_archive_app[1].', ma anche un canale privilegiato per conoscere aziende di vari settori che operano nel nostro paese ed uno strumento indispensabile per far conoscere anche la tua attività.</p>';
}
if(is_tag()) {
echo '<p>Sei alla ricerca di un sito per restare sempre informato su fisco e finanza, economia e attualità?</p><p>'.get_bloginfo( 'name' , 'raw' ).' è sicuramente il sito di riferimento che non puoi farti scappare: ti aspettano informazioni ed approfondimenti sempre aggiornati.</p><p>Nelle diverse sezioni che animano il portale puoi, infatti, trovare news su numerosi argomenti come '.$LRC_title_archive_app[1].'.</p>';
}
?>
<?php
if ( have_posts() ) {
// Query params
$kicker_stickies = is_home()
|| ( in_array( kicker_get_theme_option( 'post_type' ), array( '', 'post' ) )
&& (int) kicker_get_theme_option( 'parent_cat' ) == 0
)
? get_option( 'sticky_posts' )
: false;
$kicker_post_type = kicker_get_theme_option( 'post_type' );
$kicker_args = array(
'blog_style' => kicker_get_theme_option( 'blog_style' ),
'post_type' => $kicker_post_type,
'taxonomy' => kicker_get_post_type_taxonomy( $kicker_post_type ),
'parent_cat' => kicker_get_theme_option( 'parent_cat' ),
'posts_per_page' => kicker_get_theme_option( 'posts_per_page' ),
'sticky' => kicker_get_theme_option( 'sticky_style' ) == 'columns'
&& is_array( $kicker_stickies )
&& count( $kicker_stickies ) > 0
&& get_query_var( 'paged' ) < 1
);
kicker_blog_archive_start();
do_action( 'kicker_action_blog_archive_start' );
if ( is_author() ) {
do_action( 'kicker_action_before_page_author' );
get_template_part( apply_filters( 'kicker_filter_get_template_part', 'templates/author-page' ) );
do_action( 'kicker_action_after_page_author' );
}
if ( kicker_get_theme_option( 'show_filters' ) ) {
do_action( 'kicker_action_before_page_filters' );
kicker_show_filters( $kicker_args );
do_action( 'kicker_action_after_page_filters' );
} else {
do_action( 'kicker_action_before_page_posts' );
kicker_show_posts( array_merge( $kicker_args, array( 'cat' => $kicker_args['parent_cat'] ) ) );
do_action( 'kicker_action_after_page_posts' );
}
do_action( 'kicker_action_blog_archive_end' );
kicker_blog_archive_end();
} else {
if ( is_search() ) {
get_template_part( apply_filters( 'kicker_filter_get_template_part', 'templates/content', 'none-search' ), 'none-search' );
} else {
get_template_part( apply_filters( 'kicker_filter_get_template_part', 'templates/content', 'none-archive' ), 'none-archive' );
}
} ?>
<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>
<?php
get_footer();
}