homegrade_theme_production/template-questions.php

96 lines
4.7 KiB
PHP

<?php /* Template Name: Questions (FAQ) | Archive */
get_header();
$thematiquesTerms = get_terms(array(
'taxonomy' => 'thematiques',
'hide_empty' => false,
'parent' => 0
));
?>
<nav class="breadcrumbs_navigation" aria-label="breadcrumbs">
<ol>
<li><a href="<?php echo home_url() ?>">Home</a></li>
<li><a href="<?php echo get_post_type_archive_link('questions') ?>" aria-current='location'>FAQ</a></li>
</ol>
</nav>
<section class="archive-page-header">
<h1 class="thematiques-post-viewer__title"><?php echo __("Les questions par thématique", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></h1>
<p class="thematiques-post-viewer__description"><?php echo __("Simplifions votre recherche grâce aux questions fréquemment posées !", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></p>
<ul class="thematiques-post-viewer__terms-grid">
<?php foreach ($thematiquesTerms as $thematique) : ?>
<?php
// $thematique_icon = get_field('taxonomy_pictures', $thematique)['icon'];
$original_term_ID = apply_filters('wpml_object_id', $thematique->term_id, 'thematiques', TRUE, 'fr');
$thematique_icon = get_field('taxonomy_pictures', $thematique->taxonomy . '_' . $original_term_ID)['icon'];
$termSlug = getThematiqueFamilySlug($thematique->slug);
?>
<li class="term">
<a href="<?php echo get_term_link($thematique) ?>">
<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 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 $conseils_page_ID = apply_filters('wpml_object_id', 102, '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($conseils_page_ID) ?></h3>
<p class="card-large-content__link__excerpt"><?php echo get_the_excerpt($conseils_page_ID) ?></p>
<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($conseils_page_ID) ?>"><?php echo __("Accédez aux publications", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
</div>
<!-- SERVICE -->
<div class="card-large-content__link">
<?php $services_page_ID = apply_filters('wpml_object_id', 52, 'page', TRUE); ?>
<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 __("Accédez aux publications", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
</div>
</div>
</div>
</section>
<?php
get_footer();