| Server IP : 5.144.175.180 / Your IP : 216.73.216.191 Web Server : Apache/2.4.63 (Unix) OpenSSL/1.1.1 System : Linux vpsgpz1.itsimplycom.it 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 User : edilchimica ( ) PHP Version : 7.4.33 Disable Function : getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,shell_exec,dl,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/edilchimica/webapps/edilchimica/wp-content/themes/edilchimica-child/ |
Upload File : |
<?php /* Template Name: La nostra produzione */ ?>
<?php
/**
* Kalium WordPress Theme
*
* Laborator.co
* www.laborator.co
*/
if (!defined('ABSPATH')) {
exit; // Direct access not allowed.
}
// When using "mPress Custom Front Page" template switching is necessary
if ('portfolio' === get_post_type()) {
get_template_part('single-portfolio');
return;
}
// Show header
get_header();
// Check if is default container
$is_vc_content = preg_match("/\[vc_row.*?\]/i", $post->post_content);
$is_build_with_elementor = kalium()->elementor->is_built_with_elementor(get_the_ID());
// Password protected page doesn't use vc container
if (post_password_required()) {
$is_vc_content = false;
}
// Page title (show or hide)
$show_title = is_singular() && kalium_get_field('heading_title') && !$is_vc_content;
// Container start
$container = [];
if ($is_build_with_elementor) {
$container[] = 'elementor-content';
} else if ($is_vc_content) {
$container[] = 'vc-container';
} else {
$container[] = 'container';
$container[] = 'default-margin';
if (!kalium()->is->woocommerce_active() || !(is_woocommerce() || is_cart() || is_checkout() || is_account_page())) {
$container[] = 'post-formatting';
}
}
while (have_posts()) : the_post();
?>
<div <?php kalium_class_attr($container); ?>>
<?php
// Show page title
if (false == defined('HEADING_TITLE_DISPLAYED') && apply_filters('kalium_page_title', $show_title)) {
?>
<h1 class="wp-page-title"><?php the_title(); ?></h1>
<?php
}
// Page content
the_content();
?>
<!-- Sezione la nostra produzione -->
<div class="container-fluid laNostraProduzione">
<?php
$terms = get_terms(array(
'taxonomy' => 'categorie_prodotti',
'meta_query' => array(
array(
'key' => 'enabled',
'value' => 1,
'compare' => '='
),
),
'meta_key' => 'idx',
'orderby' => 'idx',
));
?>
<div class="container">
<?php foreach ($terms as $term) {
$products = new WP_Query(array(
'post_type' => 'prodotti',
'post_per_page' => 10,
'taxonomy' => 'categorie_prodotti',
'term' => $term->slug,
'meta_query' => array(
array(
'key' => 'enabled',
'value' => 1,
'compare' => '='
),
),
'meta_key' => 'idx',
'orderby' => 'idx',
'order' => 'ASC',
));
$count = $products->found_posts;
if ($count) {
?>
<div class="col-lg-12 categoriaProdotti">
<h3><?php echo $term->name ?></h3>
<p><?php echo $term->description ?></p>
<?php
while ($products->have_posts()) {
$products->the_post();
$breve_descrizione = get_field('breve_descrizione', get_the_ID());
?>
<a href="<?php the_permalink(); ?>">
<h4 class="cursive-italic text-yellow"><?php the_title(); ?></h4>
</a>
<span class="breve-descrizione"><?php echo $breve_descrizione ?></span>
<br>
<?php } ?>
</div>
<hr>
<?php }
} ?>
</div>
</div>
</div>
<?php
endwhile;
// Show footer
get_footer();