wrapping the page in a page container
This commit is contained in:
parent
76cc888b44
commit
29064d75b4
|
|
@ -6,121 +6,123 @@ $thematiquesTerms = get_terms(array(
|
||||||
'parent' => 0
|
'parent' => 0
|
||||||
));
|
));
|
||||||
$page_icon = get_field('page_icon', get_queried_object());
|
$page_icon = get_field('page_icon', get_queried_object());
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<nav class="breadcrumbs_navigation" aria-label="breadcrumbs">
|
|
||||||
<ol>
|
|
||||||
<li>
|
|
||||||
<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil", "homegrade-theme__texte-fonctionnel") ?>">
|
|
||||||
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="<?php echo get_post_type_archive_link('conseils') ?>" aria-current='location'>Nos conseils</a></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section class="archive-page-header">
|
<div class="homegrade-page-container homegrade-page-container--archive-questions">
|
||||||
|
<nav class="breadcrumbs_navigation" aria-label="breadcrumbs">
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil", "homegrade-theme__texte-fonctionnel") ?>">
|
||||||
|
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="<?php echo get_post_type_archive_link('conseils') ?>" aria-current='location'>Nos conseils</a></li>
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
|
||||||
<?php if ($page_icon) : ?>
|
<section class="archive-page-header">
|
||||||
<img class="archive-page-header__icon" src="<?php echo $page_icon['url'] ?>" alt="" />
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<h1 class="archive-page-header__title"><?php echo __("Nos conseils par thématique", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></h1>
|
<?php if ($page_icon) : ?>
|
||||||
<p class="archive-page-header__description"><?php echo __("Simplifions votre recherche par thématiques !", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></p>
|
<img class="archive-page-header__icon" src="<?php echo $page_icon['url'] ?>" alt="" />
|
||||||
<ul class="archive-page-header__terms-grid">
|
<?php endif; ?>
|
||||||
<?php foreach ($thematiquesTerms as $thematique) : ?>
|
|
||||||
<?php
|
|
||||||
if (
|
|
||||||
$thematique->slug === "renovation-circulaire"
|
|
||||||
|| $thematique->slug === "circulaire-renovatie"
|
|
||||||
|| $thematique->slug === "au-quotidien"
|
|
||||||
|| $thematique->slug === "dagelijks"
|
|
||||||
) continue;
|
|
||||||
|
|
||||||
$original_term_ID = apply_filters('wpml_object_id', $thematique->term_id, 'thematiques', FALSE, 'fr');
|
<h1 class="archive-page-header__title"><?php echo __("Nos conseils par thématique", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></h1>
|
||||||
$thematique_icon = get_field('taxonomy_pictures', $thematique->taxonomy . '_' . $original_term_ID)['icon'];
|
<p class="archive-page-header__description"><?php echo __("Simplifions votre recherche par thématiques !", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></p>
|
||||||
$termSlug = getThematiqueFamilySlug($thematique->slug);
|
<ul class="archive-page-header__terms-grid">
|
||||||
|
<?php foreach ($thematiquesTerms as $thematique) : ?>
|
||||||
$args = array(
|
|
||||||
'posts_per_page' => 1,
|
|
||||||
'post_type' => 'conseils',
|
|
||||||
'tax_query' => array(
|
|
||||||
array(
|
|
||||||
'taxonomy' => 'thematiques',
|
|
||||||
'field' => 'term_id',
|
|
||||||
'terms' => $thematique->term_id,
|
|
||||||
'include_children' => false
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
$relatedThematiqueConseilsQuery = new WP_Query($args);
|
|
||||||
$relatedPostConseil = $relatedThematiqueConseilsQuery->posts[0] ?? null;
|
|
||||||
?>
|
|
||||||
<?php if ($relatedPostConseil) : ?>
|
|
||||||
<li class="term">
|
|
||||||
<a href="<?php echo get_permalink($relatedPostConseil->ID) ?>">
|
|
||||||
<img src="<?php echo $thematique_icon['url'] ?>" alt="">
|
|
||||||
<p class="text-<?php echo $termSlug ?>"><span class="sr-only">Question </span><?php echo $thematique->name ?></p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="homegrade-help card-large-content-container">
|
|
||||||
|
|
||||||
<div class="card-large-content card-large-content--has-illustration">
|
|
||||||
<img class="card-large-content__top-illustration" src='<?php echo get_template_directory_uri() ?>/resources/img/illustrations/illustration-homegrade-help.svg' alt=''>
|
|
||||||
|
|
||||||
<div class="section_titling">
|
|
||||||
<h2 class="section_titling__title"><?php echo __("Comment Homegrade peut vous aider ?", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></h2>
|
|
||||||
<p class="section_titling__subtitle"><?php echo __("Homegrade met à disposition des outils en ligne pour vous aider dans votre recherche", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></p>
|
|
||||||
</div>
|
|
||||||
<div class="card-large-content__links-container">
|
|
||||||
<!-- PUBLICATIONS -->
|
|
||||||
<div class="card-large-content__link">
|
|
||||||
<?php $publication_page_ID = apply_filters('wpml_object_id', 106, 'page', TRUE); ?>
|
|
||||||
<img class="card-large-content__link__page_icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-outils.svg' ?>" alt="">
|
|
||||||
<h3 class="card-large-content__link__title"><?php echo get_the_title($publication_page_ID) ?></h3>
|
|
||||||
<p class="card-large-content__link__excerpt"><?php echo get_the_excerpt($publication_page_ID) ?></p>
|
|
||||||
<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($publication_page_ID) ?>"><?php echo __("Accédez aux publications", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
|
|
||||||
</div>
|
|
||||||
<!-- FAQ -->
|
|
||||||
<div class="card-large-content__link">
|
|
||||||
<?php $faq_page_ID = apply_filters('wpml_object_id', 60, 'page', TRUE); ?>
|
|
||||||
<img class="card-large-content__link__page_icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-faq.svg' ?>" alt="">
|
|
||||||
<h3 class="card-large-content__link__title"><?php echo get_the_title($faq_page_ID) ?></h3>
|
|
||||||
<p class="card-large-content__link__excerpt"><?php echo get_the_excerpt($faq_page_ID) ?></p>
|
|
||||||
<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($faq_page_ID) ?>"><?php echo __("Accédez aux questions", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
|
|
||||||
</div>
|
|
||||||
<!-- SERVICE -->
|
|
||||||
<div class="card-large-content__link">
|
|
||||||
<?php
|
<?php
|
||||||
$services_page_ID_FR = get_field('services_page_ID', 'options');
|
if (
|
||||||
// $services_page_ID = apply_filters('wpml_object_id', 52, 'page', TRUE);
|
$thematique->slug === "renovation-circulaire"
|
||||||
$services_page_ID = apply_filters('wpml_object_id', $services_page_ID_FR, 'page', false);
|
|| $thematique->slug === "circulaire-renovatie"
|
||||||
|
|| $thematique->slug === "au-quotidien"
|
||||||
|
|| $thematique->slug === "dagelijks"
|
||||||
|
) continue;
|
||||||
|
|
||||||
|
$original_term_ID = apply_filters('wpml_object_id', $thematique->term_id, 'thematiques', FALSE, 'fr');
|
||||||
|
$thematique_icon = get_field('taxonomy_pictures', $thematique->taxonomy . '_' . $original_term_ID)['icon'];
|
||||||
|
$termSlug = getThematiqueFamilySlug($thematique->slug);
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'posts_per_page' => 1,
|
||||||
|
'post_type' => 'conseils',
|
||||||
|
'tax_query' => array(
|
||||||
|
array(
|
||||||
|
'taxonomy' => 'thematiques',
|
||||||
|
'field' => 'term_id',
|
||||||
|
'terms' => $thematique->term_id,
|
||||||
|
'include_children' => false
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$relatedThematiqueConseilsQuery = new WP_Query($args);
|
||||||
|
$relatedPostConseil = $relatedThematiqueConseilsQuery->posts[0] ?? null;
|
||||||
?>
|
?>
|
||||||
<img class="card-large-content__link__page_icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-services.svg' ?>" alt="">
|
<?php if ($relatedPostConseil) : ?>
|
||||||
<h3 class="card-large-content__link__title"><?php echo get_the_title($services_page_ID) ?></h3>
|
<li class="term">
|
||||||
<p class="card-large-content__link__excerpt"><?php echo get_the_excerpt($services_page_ID) ?></p>
|
<a href="<?php echo get_permalink($relatedPostConseil->ID) ?>">
|
||||||
<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($services_page_ID) ?>"><?php echo __("Voir les services", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
|
<img src="<?php echo $thematique_icon['url'] ?>" alt="">
|
||||||
|
<p class="text-<?php echo $termSlug ?>"><span class="sr-only">Question </span><?php echo $thematique->name ?></p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="homegrade-help card-large-content-container">
|
||||||
|
|
||||||
|
<div class="card-large-content card-large-content--has-illustration">
|
||||||
|
<img class="card-large-content__top-illustration" src='<?php echo get_template_directory_uri() ?>/resources/img/illustrations/illustration-homegrade-help.svg' alt=''>
|
||||||
|
|
||||||
|
<div class="section_titling">
|
||||||
|
<h2 class="section_titling__title"><?php echo __("Comment Homegrade peut vous aider ?", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></h2>
|
||||||
|
<p class="section_titling__subtitle"><?php echo __("Homegrade met à disposition des outils en ligne pour vous aider dans votre recherche", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-large-content__links-container">
|
||||||
|
<!-- PUBLICATIONS -->
|
||||||
|
<div class="card-large-content__link">
|
||||||
|
<?php $publication_page_ID = apply_filters('wpml_object_id', 106, 'page', TRUE); ?>
|
||||||
|
<img class="card-large-content__link__page_icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-outils.svg' ?>" alt="">
|
||||||
|
<h3 class="card-large-content__link__title"><?php echo get_the_title($publication_page_ID) ?></h3>
|
||||||
|
<p class="card-large-content__link__excerpt"><?php echo get_the_excerpt($publication_page_ID) ?></p>
|
||||||
|
<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($publication_page_ID) ?>"><?php echo __("Accédez aux publications", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
|
||||||
|
</div>
|
||||||
|
<!-- FAQ -->
|
||||||
|
<div class="card-large-content__link">
|
||||||
|
<?php $faq_page_ID = apply_filters('wpml_object_id', 60, 'page', TRUE); ?>
|
||||||
|
<img class="card-large-content__link__page_icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-faq.svg' ?>" alt="">
|
||||||
|
<h3 class="card-large-content__link__title"><?php echo get_the_title($faq_page_ID) ?></h3>
|
||||||
|
<p class="card-large-content__link__excerpt"><?php echo get_the_excerpt($faq_page_ID) ?></p>
|
||||||
|
<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($faq_page_ID) ?>"><?php echo __("Accédez aux questions", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
|
||||||
|
</div>
|
||||||
|
<!-- SERVICE -->
|
||||||
|
<div class="card-large-content__link">
|
||||||
|
<?php
|
||||||
|
$services_page_ID_FR = get_field('services_page_ID', 'options');
|
||||||
|
// $services_page_ID = apply_filters('wpml_object_id', 52, 'page', TRUE);
|
||||||
|
$services_page_ID = apply_filters('wpml_object_id', $services_page_ID_FR, 'page', false);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<img class="card-large-content__link__page_icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-services.svg' ?>" alt="">
|
||||||
|
<h3 class="card-large-content__link__title"><?php echo get_the_title($services_page_ID) ?></h3>
|
||||||
|
<p class="card-large-content__link__excerpt"><?php echo get_the_excerpt($services_page_ID) ?></p>
|
||||||
|
<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($services_page_ID) ?>"><?php echo __("Voir les services", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user