Untitled

 avatar
unknown
plain_text
5 months ago
4.5 kB
2
Indexable
<?php
$anchor = '';
if (! empty($block['anchor'])) {
    $anchor = 'id="' . esc_attr($block['anchor']) . '" ';
}
$class_name = 'all_regions';
if (! empty($block['className'])) {
    $class_name .= ' ' . $block['className'];
}
if (! empty($block['align'])) {
    $class_name .= ' align' . $block['align'];
}
?>

<?php if (! is_admin()): ?>
    <div id="regions" <?php echo $anchor; ?> class="<?php echo esc_attr($class_name); ?>">
    <div class="bg_or filtres_container">
    <div class="filtres regions">
    <?php echo esc_attr_x( 'Filtres', 'placeholder', 'damnit' ); ?> : 
    <div class="appellations filtre">
        <div class="btns_filtres">
        <p class="show_me" data-target=".appear-appellation"> 
        <?php echo esc_attr_x('Appellation', 'placeholder', 'damnit'); ?>
    </p>
    <p class="show_me" data-target=".appear-recherche"> 
        <img src="/wp-content/themes/swd/img/search.png" alt=" <?php echo esc_attr_x( 'Recherche ', 'placeholder', 'damnit' ); ?>"/>
    </p>
        </div>
   
        <div class="result_filtres">
        <div class="appear appear-appellation">
        <?php echo do_shortcode('[facetwp facet="appellation"]'); ?>
    </div>
    <div class="appear appear-recherche">
        <?php echo do_shortcode('[facetwp facet="recherche_appellation"]'); ?>
    </div>
        </div>
  
</div>
    </div>
    </div>


        <?php
        $argsBlog = array(
            'post_type' => 'region',
            'post_status' => 'publish',
            'order' => 'DESC',
           // 'posts_per_page' => 5,
            'orderby' => 'date',
           // 'ignore_sticky_posts' => true,
           // 'facetwp' => true
        );
        $my_queryBlog = new WP_Query($argsBlog);

        if ($my_queryBlog->have_posts()) : while ($my_queryBlog->have_posts()) : $my_queryBlog->the_post();  ?>
            <?php
                $introduction = get_post_meta(get_the_ID(), 'introduction', true);
                $geographie_et_sol = get_post_meta(get_the_ID(), 'geographie_et_sol', true);
                $climat = get_post_meta(get_the_ID(), 'climat', true);
                $pratiques_viticoles = get_post_meta(get_the_ID(), 'pratiques_viticoles', true);
                ?>
            <div class="single_region">
                <div class="content_region">
                    <div class="magic_appear">
                        <h2 class="entry-title"><?php the_title(); ?></h2>
                        <p><?php echo esc_html($introduction); ?></p>
                    </div>
                   
                    <div class="comeback">

                    <div class="acc">
                    <div class="acc__card ">
                        <div class="acc__title"><?php _e( 'Géographie et sol', 'damnit' ); ?>  </div>
                        <div class="acc__panel"><?php echo esc_html($geographie_et_sol); ?></div>
                    </div>

                    <div class="acc__card ">
                        <div class="acc__title"><?php _e( 'Climat', 'damnit' ); ?>  </div>
                        <div class="acc__panel"><?php echo esc_html($climat); ?> </div>
                    </div>

                    <div class="acc__card ">
                        <div class="acc__title"><?php _e( 'Pratiques viticoles', 'damnit' ); ?>  </div>
                        <div class="acc__panel"><?php echo esc_html($pratiques_viticoles); ?> </div>
                    </div>
                </div>

                <div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
                    <div class="wp-block-button">
                        <a href="<?php echo esc_url( get_permalink() ); ?>" class="wp-block-button__link has-noir-color has-blanc-background-color has-text-color has-background has-link-color wp-element-button"><?php _e( 'En savoir plus', 'damnit' ); ?> </a>
                    </div>
                </div>
                </div>
                </div>
                <div class="image_region" style="background-image:url(<?php the_post_thumbnail_url() ?>);">
                   
                </div>
            </div>

              
                              


        <?php endwhile;
        endif;
        wp_reset_postdata(); ?>
    </div>
<?php else: ?>
    <div class="blogContent">
        <h5>Affichage des régions avec filtres. Veuillez faire vos modifications dans la rubrique "Régions".</h5>
    </div>
<?php endif; ?>
Editor is loading...
Leave a Comment