Файловый менеджер - Редактировать - /var/www/vhosts/allit.dev1.mndrn.cloud/wp-content/themes/allit/tpl-prodotti.php
Назад
<?php /* Template Name: Prodotti */ ?> <?php get_header(); ?> <?php $introazienda = get_field('intro_azienda'); $deskImg = get_field('immagine_desk'); ?> <picture class="picture-hero"> <source media="(min-width:1024px)" srcset="<?php echo $deskImg; ?>"> <img class="img-hero" src="<?php echo get_the_post_thumbnail_url(); ?>"></img> </picture> <div class="px-4 lg:px-0 mt-10 max-w-7xl z-10 relative w-full mx-auto"> <?php if (function_exists('yoast_breadcrumb')) { yoast_breadcrumb('<p id="breadcrumbs" class="text-[#3089B0] uppercase float-left">', '</p>'); } ?> <div class="inline text-3xl text-gray-300 ml-2">^</div> </div> <div class="my-4 block px-4 mt-10 lg:px-0 max-w-7xl z-10 w-full mx-auto"> <div class="max-w-none"> <div class="text-[#204A81] text-4xl"> <?php echo $introazienda['titolo'] ?> </div> <div class="mt-4 lg:text-2xl"> <?php echo $introazienda['intro'] ?> </div> </div> </div> <?php $terms = get_terms( array( 'taxonomy' => 'tipologia_prodotto', 'hide_empty' => false, ) ); ?> <div class="block mt-4 mb-8 relative overflow-hidden lg:px-0 max-w-7xl z-10 w-full mx-auto"> <div class="slickcategory md:flex md:gap-10"> <?php foreach ($terms as $index => $term) : ?> <?php $thumbnail = get_field('immagine_categoria', $term->taxonomy . '_' . $term->term_id); ?> <?php $term_link = get_term_link( $term ); ?> <?php $args = array( 'post_type' =>'prodotto', 'tax_query' => array( array ( 'taxonomy' => 'tipologia_prodotto', 'field' => 'slug', 'terms' => $term->slug, ) ), ); $query = new WP_Query( $args ); ?> <div class="bg-opacity-90 bg-white"> <div class="group"> <div class="relative "> <img src="<?php echo $thumbnail; ?>" class=" transition-all duration-300 ease-in-out rounded-l" alt=""> <div class="absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2"> <?php for ($i = 0; $i < 3; $i++) : ?> <span class="h-2 w-2 rounded-full md:hidden <?php echo ($index === $i) ? 'bg-[#FFB703]' : 'bg-gray-400'; ?> transition-all duration-300"></span> <?php endfor; ?> </div> </div> <div class="p-4"> <?php if ( $query->have_posts() ) : ?> <?php while ( $query->have_posts() ) : $query->the_post(); ?> <div class="flex justify-between items-center my-8"> <div class=""> <img src="/wp-content/uploads/2023/11/Vector-6arrow.png" class="w-2 h-auto mr-2 lg:w-3 lg:mr-4" alt=""> </div> <div class="flex-grow text-lg lg:text-2xl"> <?php the_title(); ?> </div> </div> <?php endwhile;?> <?php endif; ?> <div class="mt-10"> <a href="<?php echo $term_link ?>" class="text-left text-[#FFB703] w-8 uppercase mt-8 text-base transition-all duration-300 ease-in-out border-2 border-[#FFB703] lg:text-xl " style="padding: 10px 24px;"> Scopri </a> </div> </div> </div> </div> <?php endforeach; ?> </div> </div> <?php get_footer(); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.5 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка