refining puclications page
This commit is contained in:
parent
f79db534c7
commit
1cec7773ac
|
|
@ -1,62 +1,52 @@
|
||||||
.archives-publications-header {
|
.template-archives--publications {
|
||||||
@apply bg-primary max-w-screen-xl text-white text-center mx-auto;
|
.archives-publications-header {
|
||||||
}
|
@apply bg-primary max-w-screen-xl text-white text-center mx-auto;
|
||||||
|
}
|
||||||
.highlighted-brochure {
|
.highlighted-publication {
|
||||||
@apply max-w-screen-xl
|
@apply max-w-screen-xl
|
||||||
p-8
|
mb-10
|
||||||
mx-auto
|
p-8
|
||||||
mt-0
|
mx-auto
|
||||||
bg-secondary-light;
|
rounded-2xl
|
||||||
|
bg-secondary-light
|
||||||
/* &__infos {
|
|
||||||
&:after {
|
|
||||||
@apply absolute
|
|
||||||
left-0
|
|
||||||
bottom-0
|
|
||||||
w-full
|
|
||||||
bg-secondary-light;
|
|
||||||
content: '';
|
|
||||||
height: 200px;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
&__wrapper {
|
|
||||||
@apply relative
|
|
||||||
flex
|
flex
|
||||||
flex-row
|
flex-row
|
||||||
items-end
|
items-center
|
||||||
justify-between;
|
justify-around;
|
||||||
}
|
&__infos {
|
||||||
&__titling {
|
}
|
||||||
@apply flex items-center gap-4;
|
|
||||||
&__icon {
|
&__titling {
|
||||||
@apply bg-secondary rounded-full w-8 h-8 flex items-center justify-center;
|
@apply flex items-center gap-4 w-fit;
|
||||||
img {
|
&__icon {
|
||||||
@apply w-full;
|
@apply bg-secondary rounded-full w-8 h-8 flex items-center justify-center;
|
||||||
max-width: 40%;
|
img {
|
||||||
|
@apply w-full;
|
||||||
|
max-width: 40%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&__title {
|
||||||
|
@apply font-bold text-secondary text-xl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&__title {
|
&__comment {
|
||||||
@apply font-bold text-secondary text-xl;
|
@apply pt-4 max-w-3xl pr-6 text-secondary;
|
||||||
|
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__cover {
|
||||||
|
/* transform: translateY(-30%); */
|
||||||
|
@apply rounded-2xl;
|
||||||
|
max-width: 200px;
|
||||||
|
/* transform: scale(2) translate(-50%, -20%); */
|
||||||
|
}
|
||||||
|
.cta {
|
||||||
|
@apply mt-8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&__comment {
|
.brochures-archives,
|
||||||
@apply pt-4 w-2/3 max-w-5xl pr-6;
|
.fiches-infos-archives {
|
||||||
}
|
@apply max-w-screen-xl mx-auto py-4 mt-8;
|
||||||
|
|
||||||
&__cover {
|
|
||||||
@apply absolute right-0 bottom-0;
|
|
||||||
/* transform: translateY(-30%); */
|
|
||||||
@apply w-1/3;
|
|
||||||
max-width: 250px;
|
|
||||||
/* transform: scale(2) translate(-50%, -20%); */
|
|
||||||
}
|
|
||||||
.cta {
|
|
||||||
@apply mt-8;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.brochures-archives,
|
|
||||||
.fiches-infos-archives {
|
|
||||||
@apply max-w-screen-xl mx-auto py-4 mt-8;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,66 @@
|
||||||
<?php /* Template Name: Publications | Archive */
|
<?php /* Template Name: Publications | Archive */
|
||||||
get_header();
|
get_header();
|
||||||
$current_page_id = get_queried_object_id();
|
$current_page_id = get_queried_object_id();
|
||||||
|
$pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$posts_per_page = 5;
|
||||||
|
|
||||||
|
// #### BROCHURES QUERY
|
||||||
|
$args = array(
|
||||||
|
'post_type' => 'brochures',
|
||||||
|
'posts_per_page' => $posts_per_page,
|
||||||
|
'post_status' => 'publish',
|
||||||
|
'order' => 'DESC',
|
||||||
|
'orderby' => 'date',
|
||||||
|
'meta_key' => 'brochure_pdf',
|
||||||
|
'meta_value' => '',
|
||||||
|
'meta_compare' => '!=',
|
||||||
|
// ICI METAQUERY FOR LE PDF
|
||||||
|
);
|
||||||
|
$brochuresPosts = new WP_Query($args);
|
||||||
|
|
||||||
|
|
||||||
|
// #### FICHES INFOS QUERY
|
||||||
|
$args = array(
|
||||||
|
'post_type' => 'fiches-infos',
|
||||||
|
'posts_per_page' => $posts_per_page,
|
||||||
|
'post_status' => 'publish',
|
||||||
|
'order' => 'DESC',
|
||||||
|
'orderby' => 'date',
|
||||||
|
'meta_key' => 'brochure_pdf',
|
||||||
|
'meta_value' => '',
|
||||||
|
'meta_compare' => '!=',
|
||||||
|
// ICI METAQUERY FOR LE PDF
|
||||||
|
);
|
||||||
|
$fichesInfosPosts = new WP_Query($args);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// #### VIDÉOS & WEBINAIRES QUERY
|
||||||
|
$args = array(
|
||||||
|
'post_type' => 'fiches-infos',
|
||||||
|
'posts_per_page' => $posts_per_page,
|
||||||
|
'post_status' => 'publish',
|
||||||
|
'order' => 'DESC',
|
||||||
|
'orderby' => 'date',
|
||||||
|
'meta_key' => 'brochure_pdf',
|
||||||
|
'meta_value' => '',
|
||||||
|
'meta_compare' => '!=',
|
||||||
|
// ICI METAQUERY FOR LE PDF
|
||||||
|
);
|
||||||
|
$fichesInfosPosts = new WP_Query($args);
|
||||||
|
|
||||||
|
$total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_posts + 100;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="template-archives template-archives--publications">
|
<div class="template-archives template-archives--publications">
|
||||||
|
<?php /* ------------
|
||||||
|
BREADCRUMB
|
||||||
|
-----------------*/ ?>
|
||||||
<nav class="breadcrumbs_navigation" aria-label="breadcrumbs">
|
<nav class="breadcrumbs_navigation" aria-label="breadcrumbs">
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="<?php echo home_url() ?>">Home</a></li>
|
<li><a href="<?php echo home_url() ?>">Home</a></li>
|
||||||
|
|
@ -12,80 +69,134 @@ $current_page_id = get_queried_object_id();
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
<section class="archive-page-header">
|
<?php /* ---------
|
||||||
<h1 class="archive-page-header__title"><?php echo __("Nos publications", "homegrade-theme__texte-fonctionnel__archive-publications") ?></h1>
|
HEADING BOX
|
||||||
<p class="archive-page-header__description"><?php echo __("Découvrez toutes nos publications et outils en ligne", "homegrade-theme__texte-fonctionnel__archive-publications") ?>
|
-----------------*/ ?>
|
||||||
</p>
|
|
||||||
<?php get_search_form(); ?>
|
|
||||||
</section>
|
|
||||||
<?php
|
<?php
|
||||||
$highlightedBrochureRelatedPost = get_field('highlighted_brochure', $current_page_id) ?? null;
|
get_template_part("template-components/heading-box", null, array(
|
||||||
$highlightedBrochurePdf = get_field('brochure_pdf', $highlightedBrochureRelatedPost->ID) ?? null;
|
"pageIcon" => $pageIcon,
|
||||||
$highlightedBrochureCover = get_field('brochure_cover_image', $highlightedBrochurePdf['ID']) ?? null;
|
"title" => get_the_title(get_queried_object_id()),
|
||||||
$highlightedBrochureComment = get_field('highlighted_brochure_comment', $current_page_id) ?? null;
|
"description" => __("Découvrez toutes nos publications et outils en ligne", "homegrade-theme__texte-fonctionnel"),
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
<?php if ($highlightedBrochurePdf) : ?>
|
|
||||||
<div class="highlighted-brochure">
|
|
||||||
<div class="highlighted-brochure__wrapper">
|
|
||||||
<div class="highlighted-brochure__infos">
|
|
||||||
|
|
||||||
<div class="highlighted-brochure__titling">
|
<?php /* -------
|
||||||
<div class="highlighted-brochure__titling__icon">
|
FILTERS
|
||||||
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/house-homegrade-icon.svg' ?>" alt="">
|
---------------*/ ?>
|
||||||
</div>
|
<div class="filters-toolbar filters-toolbar--archive-news">
|
||||||
<h3 class="highlighted-brochure__titling__title">
|
<p class="filters-toolbar__posts-results-amount filter-disable" role="status">
|
||||||
<?php echo __("Sélection de nos conseillers", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?>
|
<span class="results-amount">
|
||||||
</h3>
|
<?php echo $posts->found_posts ?>
|
||||||
</div>
|
</span>
|
||||||
|
<span class="results-text">
|
||||||
|
<?php echo __("résultat(s)", "homegrade-theme__texte-fonctionnel"); ?>
|
||||||
|
</span>
|
||||||
|
|
||||||
<?php if ($highlightedBrochureComment) : ?>
|
<span class="results-for">
|
||||||
<p class="highlighted-brochure__comment"><?php echo $highlightedBrochureComment ?></p>
|
<?php echo __("pour", "homegrade-theme__texte-fonctionnel") . " : "; ?>
|
||||||
<?php endif; ?>
|
</span>
|
||||||
<a class="cta cta--secondary cta--button" href="<?php echo $highlightedBrochurePdf['url'] ?>" target="_blank"><?php echo __("Consulter le PDF", "homegrade-theme__texte-fonctionnel__archive-publications") ?></a>
|
<span class="results-filter-name">
|
||||||
</div>
|
<?php echo __("categorie", "homegrade-theme__texte-fonctionnel"); ?>
|
||||||
<?php if ($highlightedBrochureCover) : ?>
|
</span>
|
||||||
<img class="highlighted-brochure__cover" src='<?php echo $highlightedBrochureCover['sizes']['large'] ?>' />
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<button class="filters-toolbar__action-button" data-term-id="all" data-term-name="all">Tous</button>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<button class="filters-toolbar__action-button" data-term-id="brochure-thématique" data-term-name="all">
|
||||||
|
<img class="icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-brochures.svg' ?>" alt='' />
|
||||||
|
|
||||||
|
<?php echo __("Brochures thématiques", "homegrade-theme__texte-fonctionnel") ?>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<button class="filters-toolbar__action-button" data-term-id="fiches-infos" data-term-name="fiches-infos">
|
||||||
|
<img class="icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-fiches.svg' ?>" alt='' />
|
||||||
|
<?php echo __("Fiches Infos", "homegrade-theme__texte-fonctionnel") ?>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<button class="filters-toolbar__action-button" data-term-id="all" data-term-name="all">
|
||||||
|
<img class="icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-videos.svg' ?>" alt='' />
|
||||||
|
<?php echo __("Vidéos & Webinaires", "homegrade-theme__texte-fonctionnel") ?>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php /* ---------
|
||||||
|
BROCHURES
|
||||||
|
-----------------*/ ?>
|
||||||
<section class="brochures-archives">
|
<section class="brochures-archives">
|
||||||
<div class="section_titling section_titling--left">
|
<div class="section_titling section_titling--left">
|
||||||
<h2 class="section_titling__title"><?php echo __("Nos Brochures thématiques", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></h2>
|
<h2 class="section_titling__title"><?php echo __("Nos Brochures thématiques", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></h2>
|
||||||
<p class="section_titling__subtitle">Curabitur eleifend neque eu erat lacinia tincidunt</p>
|
<p class="section_titling__subtitle">Curabitur eleifend neque eu erat lacinia tincidunt</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$highlightedBrochureRelatedPost = get_field('highlighted_brochure', $current_page_id) ?? null;
|
||||||
'post_type' => 'brochures',
|
$highlightedBrochurePdf = get_field('brochure_pdf', $highlightedBrochureRelatedPost->ID) ?? null;
|
||||||
'posts_per_page' => 1,
|
$highlightedBrochureCover = get_field('brochure_cover_image', $highlightedBrochurePdf['ID']) ?? null;
|
||||||
'post_status' => 'publish',
|
$highlightedBrochureComment = get_field('highlighted_brochure_comment', $current_page_id) ?? null;
|
||||||
'order' => 'DESC',
|
|
||||||
'orderby' => 'date',
|
|
||||||
'meta_key' => 'brochure_pdf',
|
|
||||||
'meta_value' => '',
|
|
||||||
'meta_compare' => '!=',
|
|
||||||
// ICI METAQUERY FOR LE PDF
|
|
||||||
);
|
|
||||||
$brochures = new WP_Query($args);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<?php if ($highlightedBrochurePdf) : ?>
|
||||||
|
<div class="highlighted-publication">
|
||||||
|
<div class="highlighted-publication__infos">
|
||||||
|
|
||||||
|
<div class="highlighted-publication__titling">
|
||||||
|
<div class="highlighted-publication__titling__icon">
|
||||||
|
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/house-homegrade-icon.svg' ?>" alt="">
|
||||||
|
</div>
|
||||||
|
<h3 class="highlighted-publication__titling__title">
|
||||||
|
<?php echo __("Sélection de nos conseillers", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if ($highlightedBrochureComment) : ?>
|
||||||
|
<p class="highlighted-publication__comment"><?php echo $highlightedBrochureComment ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
<a class="cta cta--secondary cta--button" href="<?php echo $highlightedBrochurePdf['url'] ?>" target="_blank"><?php echo __("Consulter le PDF", "homegrade-theme__texte-fonctionnel__archive-publications") ?></a>
|
||||||
|
</div>
|
||||||
|
<?php if ($highlightedBrochureCover) : ?>
|
||||||
|
<img class="highlighted-publication__cover" src='<?php echo $highlightedBrochureCover['sizes']['large'] ?>' />
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul class="brochures-grid">
|
<ul class="brochures-grid">
|
||||||
<?php if ($brochures->have_posts()) : while ($brochures->have_posts()) : $brochures->the_post(); ?>
|
<?php if ($brochuresPosts->have_posts()) : while ($brochuresPosts->have_posts()) : $brochuresPosts->the_post(); ?>
|
||||||
<?php
|
<?php
|
||||||
get_template_part('template-components/archives/brochure-grid-row', null, array('ID' => get_the_ID()));
|
$brochurePdf = get_field('brochure_pdf', $args['ID']);
|
||||||
|
$brochureCover = get_field('brochure_cover_image', $brochurePdf['ID']);
|
||||||
|
$brochureEdition = get_field('brochure_edition', $args['ID']);
|
||||||
|
$thematique = get_the_terms($args['ID'], 'thematiques')[0];
|
||||||
|
$rootThematic = getParentThematique($thematique);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="publications-grid__row">
|
||||||
|
<?php if ($brochureCover) : ?>
|
||||||
|
<img class="publications-grid__cover" src="<?php echo $brochureCover['sizes']['medium'] ?>" />
|
||||||
|
<?php endif; ?>
|
||||||
|
<h2 class="publications-grid__title"><?php echo $brochurePdf['title'] ?></h2>
|
||||||
|
<p class="publications-grid__thematique thematique-tag thematique-tag--<?php echo $rootThematic->slug ?>"><?php echo $rootThematic->name ?></p>
|
||||||
|
|
||||||
|
<?php if ($brochureEdition) : ?>
|
||||||
|
<p class="publications-grid__edition"><?php echo $brochureEdition ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="publications-grid__button">
|
||||||
|
<a href="<?php echo $brochurePdf['url'] ?>" class=" cta cta--secondary cta--button" href="#" target="_blank"><?php echo __("Consulter le pdf", "homegrade-theme__texte-fonctionnel__publications-archive") ?></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<?php endwhile ?>
|
<?php endwhile ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<button id="load-more-brochures" class="cta cta--button cta--shadowed" target="_blank"><?php echo __("Consulter plus de brochures", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></button>
|
<button id="load-more-brochures" class="cta cta--button cta--shadowed" target="_blank"><?php echo __("Consulter plus de brochures", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></button>
|
||||||
<?php wp_reset_postdata(); ?>
|
<?php wp_reset_postdata(); ?>
|
||||||
|
|
@ -93,49 +204,82 @@ $current_page_id = get_queried_object_id();
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<?php /* -----------
|
||||||
|
FICHES INFOS
|
||||||
|
------------------*/ ?>
|
||||||
<section class="fiches-infos-archives">
|
<section class="fiches-infos-archives">
|
||||||
<div class="section_titling section_titling--left">
|
<div class="section_titling section_titling--left">
|
||||||
<h2 class="section_titling__title"><?php echo __("Nos Fiches infos", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></h2>
|
<h2 class="section_titling__title"><?php echo __("Nos Fiches infos", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></h2>
|
||||||
<p class="section_titling__subtitle">Phasellus elit turpis, viverra id porta gravida</p>
|
<p class="section_titling__subtitle">Phasellus elit turpis, viverra id porta gravida</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
$args = array(
|
|
||||||
'post_type' => 'fiches-infos',
|
|
||||||
'posts_per_page' => 1,
|
|
||||||
'post_status' => 'publish',
|
|
||||||
'order' => 'DESC',
|
|
||||||
'orderby' => 'date',
|
|
||||||
'meta_key' => 'brochure_pdf',
|
|
||||||
'meta_value' => '',
|
|
||||||
'meta_compare' => '!=',
|
|
||||||
// ICI METAQUERY FOR LE PDF
|
|
||||||
);
|
|
||||||
$fiches_infos = new WP_Query($args);
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
<ul class="publications-grid">
|
<ul class="publications-grid">
|
||||||
<?php if ($fiches_infos->have_posts()) : while ($fiches_infos->have_posts()) : $fiches_infos->the_post(); ?>
|
<?php if ($fichesInfosPosts->have_posts()) : while ($fichesInfosPosts->have_posts()) : $fichesInfosPosts->the_post(); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$ficheInfoPdf = get_field('brochure_pdf', get_the_ID());
|
$ficheInfoPdf = get_field('brochure_pdf', get_the_ID());
|
||||||
// $ficheInfoCover = get_field('brochure_cover', get_the_ID());
|
// $ficheInfoCover = get_field('brochure_cover', get_the_ID());
|
||||||
$ficheInfoCover = get_field('brochure_cover_image', $ficheInfoPdf['ID']);
|
// $ficheInfoCover = get_field('brochure_cover_image', $ficheInfoPdf['ID']);
|
||||||
|
|
||||||
$ficheInfoEdition = get_field('brochure_edition', get_the_ID());
|
$ficheInfoEdition = get_field('brochure_edition', get_the_ID());
|
||||||
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||||
$rootThematic = getParentThematique($thematique);
|
$rootThematic = getParentThematique($thematique);
|
||||||
|
$rootThematicIcon = get_field('taxonomy_pictures', "thematiques_" . $rootThematic->term_id)['icon'] ?? null;
|
||||||
?>
|
?>
|
||||||
<li class="publications-grid__row">
|
<li class="publications-grid__row">
|
||||||
<p>missing the cover</p>
|
|
||||||
<?php if ($ficheInfoCover) : ?>
|
<?php if ($rootThematicIcon) : ?>
|
||||||
<img class="brochures-grid__cover" src="<?php echo $ficheInfoCover['sizes']['medium'] ?>" />
|
<img class="publications-grid__icon" src="<?php echo $rootThematicIcon['url'] ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<h2 class="publications-grid__title"><?php echo $ficheInfoPdf['title'] ?></h2>
|
<h2 class="publications-grid__title"><?php echo get_the_title() ?></h2>
|
||||||
<p class="publications-grid__thematique"><?php echo $rootThematic->name ?></p>
|
<p class="publications-grid__thematique thematique-tag thematique-tag--<?php echo $rootThematic->slug ?>"><?php echo $rootThematic->name ?></p>
|
||||||
|
<?php if ($ficheInfoEdition) : ?>
|
||||||
|
<p class="publications-grid__edition"><?php echo $ficheInfoEdition ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="publications-grid__button">
|
||||||
|
<a href="<?php echo $brochurePdf['url'] ?>" class=" cta cta--secondary cta--button" href="#" target="_blank"><?php echo __("Consulter le pdf", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<?php endwhile ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<button id="load-more-brochures" class="cta cta--button cta--shadowed" target="_blank"><?php echo __("Consulter plus de fiches infos", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></button>
|
||||||
|
<?php wp_reset_postdata(); ?>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php /* ---------------
|
||||||
|
VIDÉOS & WEBINAIRES
|
||||||
|
-----------------------*/ ?>
|
||||||
|
<section class="videos-webinaires-archives">
|
||||||
|
<div class="section_titling section_titling--left">
|
||||||
|
<h2 class="section_titling__title"><?php echo __("Nos vidéos et webinaires", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></h2>
|
||||||
|
<p class="section_titling__subtitle">Phasellus elit turpis, viverra id porta gravida</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="publications-grid">
|
||||||
|
<?php if ($fichesInfosPosts->have_posts()) : while ($fichesInfosPosts->have_posts()) : $fichesInfosPosts->the_post(); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$ficheInfoPdf = get_field('brochure_pdf', get_the_ID());
|
||||||
|
// $ficheInfoCover = get_field('brochure_cover', get_the_ID());
|
||||||
|
// $ficheInfoCover = get_field('brochure_cover_image', $ficheInfoPdf['ID']);
|
||||||
|
|
||||||
|
$ficheInfoEdition = get_field('brochure_edition', get_the_ID());
|
||||||
|
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||||
|
$rootThematic = getParentThematique($thematique);
|
||||||
|
$rootThematicIcon = get_field('taxonomy_pictures', "thematiques_" . $rootThematic->term_id)['icon'] ?? null;
|
||||||
|
?>
|
||||||
|
<li class="publications-grid__row">
|
||||||
|
|
||||||
|
<?php if ($rootThematicIcon) : ?>
|
||||||
|
<img class="publications-grid__icon" src="<?php echo $rootThematicIcon['url'] ?>" />
|
||||||
|
<?php endif; ?>
|
||||||
|
<h2 class="publications-grid__title"><?php echo get_the_title() ?></h2>
|
||||||
|
<p class="publications-grid__thematique thematique-tag thematique-tag--<?php echo $rootThematic->slug ?>"><?php echo $rootThematic->name ?></p>
|
||||||
<?php if ($ficheInfoEdition) : ?>
|
<?php if ($ficheInfoEdition) : ?>
|
||||||
<p class="publications-grid__edition"><?php echo $ficheInfoEdition ?></p>
|
<p class="publications-grid__edition"><?php echo $ficheInfoEdition ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
@ -154,7 +298,6 @@ $current_page_id = get_queried_object_id();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user