Compare commits
5 Commits
255e86649c
...
d11d9cd40a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d11d9cd40a | ||
|
|
7acb2e5fb3 | ||
|
|
92482d22d1 | ||
|
|
9bbe4977d4 | ||
|
|
1ec1e9b507 |
|
|
@ -223,7 +223,7 @@ function carhop_register_taxonomies()
|
||||||
'search_items' => __('Rechercher des types', 'carhop-post-types'),
|
'search_items' => __('Rechercher des types', 'carhop-post-types'),
|
||||||
'not_found' => __('Non trouvé', 'carhop-post-types'),
|
'not_found' => __('Non trouvé', 'carhop-post-types'),
|
||||||
'no_terms' => __('Aucun type', 'carhop-post-types'),
|
'no_terms' => __('Aucun type', 'carhop-post-types'),
|
||||||
'items_list' => __('Liste des types', 'carhop-post-types'),
|
'items_list' => __('Liste des types', 'carhop-post-types'),
|
||||||
'items_list_navigation' => __('Navigation dans la liste des types', 'carhop-post-types'),
|
'items_list_navigation' => __('Navigation dans la liste des types', 'carhop-post-types'),
|
||||||
);
|
);
|
||||||
$args = array(
|
$args = array(
|
||||||
|
|
|
||||||
|
|
@ -45,5 +45,3 @@ function shared_create_posttype()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
add_action('init', 'shared_create_posttype');
|
add_action('init', 'shared_create_posttype');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ wp_enqueue_script('carhop-gallery-view');
|
||||||
<div class="swiper-slide">
|
<div class="swiper-slide">
|
||||||
<div class="gallery-card">
|
<div class="gallery-card">
|
||||||
<div class="gallery-card__image">
|
<div class="gallery-card__image">
|
||||||
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
|
<img src="<?php echo $image['url'] ?? ''; ?>" alt="<?php echo $image['alt'] ?? ''; ?>" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"name": "acf/team-dynamiques",
|
||||||
|
"title": "Equipe Dynamiques",
|
||||||
|
"category": "dynamiques-blocks",
|
||||||
|
"multiple": false,
|
||||||
|
"icon": {
|
||||||
|
"foreground": "#136f63",
|
||||||
|
"src": "groups"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"auteurs",
|
||||||
|
"equipe",
|
||||||
|
"dynamiques"
|
||||||
|
],
|
||||||
|
"supports": {
|
||||||
|
"align": [
|
||||||
|
"full"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"acf": {
|
||||||
|
"mode": "auto",
|
||||||
|
"renderTemplate": "team-dynamiques.php"
|
||||||
|
},
|
||||||
|
"align": "full"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
$placeholder_thumbnail_counter = 0;
|
||||||
|
|
||||||
|
|
||||||
|
switch_to_blog(1);
|
||||||
|
$comities_field_object = get_field_object('field_699737b48c0d2');
|
||||||
|
$comities = $comities_field_object ? $comities_field_object['choices'] : [];
|
||||||
|
|
||||||
|
|
||||||
|
restore_current_blog();
|
||||||
|
?>
|
||||||
|
<?php switch_to_blog(1); ?>
|
||||||
|
<section class="team-authors content-section alignwide">
|
||||||
|
<h2 class="title-small">Équipe dynamiques</h2>
|
||||||
|
<h3 class="subtitle-big">À la croisée des plumes et des luttes</h3>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<?php foreach ($comities as $comity_value => $comity_label) : ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$comities_related_members = new WP_Query(array(
|
||||||
|
'post_type' => 'equipe',
|
||||||
|
'posts_per_page' => -1,
|
||||||
|
'meta_key' => 'last_name',
|
||||||
|
'orderby' => 'meta_value',
|
||||||
|
'order' => 'ASC',
|
||||||
|
'meta_query' => array(
|
||||||
|
array(
|
||||||
|
'key' => 'comity',
|
||||||
|
'value' => $comity_value,
|
||||||
|
'compare' => 'LIKE',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'key' => 'is_part_of_dynamiques',
|
||||||
|
'value' => true,
|
||||||
|
'compare' => 'LIKE',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
if (!$comities_related_members->have_posts()) continue;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<?php restore_current_blog(); ?>
|
||||||
|
<div class="comity-type">
|
||||||
|
<h3 class="comity-type__title"><?php echo $comity_label; ?></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="comity-type__list">
|
||||||
|
<?php while ($comities_related_members->have_posts()) : $comities_related_members->the_post(); ?>
|
||||||
|
<?php
|
||||||
|
$memberID = get_the_ID();
|
||||||
|
$is_part_of_dynamiques = get_field('is_member_of', $memberID);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<?php get_template_part('template-parts/components/cards/member-card', '', array('member_id' => $memberID, 'redirect_to_author_page' => true)); ?>
|
||||||
|
<?php endwhile; ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
@ -27,6 +27,7 @@ function create_block_dynamiques_blocks_block_init()
|
||||||
|
|
||||||
##### REGISTER ACF BLOCKS #####
|
##### REGISTER ACF BLOCKS #####
|
||||||
register_block_type(__DIR__ . '/acf-blocks/team-authors');
|
register_block_type(__DIR__ . '/acf-blocks/team-authors');
|
||||||
|
register_block_type(__DIR__ . '/acf-blocks/team-dynamiques');
|
||||||
register_block_type(__DIR__ . '/acf-blocks/statistics-datas');
|
register_block_type(__DIR__ . '/acf-blocks/statistics-datas');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user