encapsulating suggested-publications section
This commit is contained in:
parent
cd0d7d4730
commit
1138844470
|
|
@ -48,43 +48,46 @@ get_header();
|
||||||
|
|
||||||
)); ?>
|
)); ?>
|
||||||
|
|
||||||
<!-- PUBLCIATIONS SUGGÉRÉS -->
|
<section class="suggested-publications">
|
||||||
<div class="card-large-content-container">
|
<!-- PUBLCIATIONS SUGGÉRÉS -->
|
||||||
<?php
|
<div class="card-large-content-container">
|
||||||
$args = array(
|
<?php
|
||||||
'post_type' => 'brochures',
|
$args = array(
|
||||||
'posts_per_page' => 5,
|
'post_type' => 'brochures',
|
||||||
'orderby' => 'rand',
|
'posts_per_page' => 5,
|
||||||
'post_status' => 'publish',
|
'orderby' => 'rand',
|
||||||
'meta_query' => array(
|
'post_status' => 'publish',
|
||||||
array(
|
'meta_query' => array(
|
||||||
'key' => 'brochure_pdf',
|
|
||||||
'compare' => 'EXISTS'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
);
|
|
||||||
$suggestedPublications = new WP_Query($args);
|
|
||||||
$pagePublicationsUrl = get_page_by_template('template-publications.php') ? get_permalink(get_page_by_template('template-publications.php')[0]->ID) : null;
|
|
||||||
?>
|
|
||||||
<div class="card-large-content">
|
|
||||||
<div class="section_titling">
|
|
||||||
<h2 class="section_titling__title"><?php echo __("Publications suggérées", "homegrade-theme__texte-fonctionnel") ?></h2>
|
|
||||||
<p class="section_titling__subtitle"><?php echo __("Consultez notre documentation pour en savoir plus", "homegrade-theme__texte-fonctionnel") ?></p>
|
|
||||||
</div>
|
|
||||||
<ul id="brochures-rows" class="publications-grid">
|
|
||||||
<?php
|
|
||||||
get_template_part(
|
|
||||||
'template-components/archives/brochure-rows',
|
|
||||||
null,
|
|
||||||
array(
|
array(
|
||||||
'brochuresPosts' => $suggestedPublications,
|
'key' => 'brochure_pdf',
|
||||||
|
'compare' => 'EXISTS'
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
?>
|
);
|
||||||
</ul>
|
$suggestedPublications = new WP_Query($args);
|
||||||
<a class="cta cta--outline cta--button mx-auto" href="<?php echo $pagePublicationsUrl ?>"><?php echo __("Consulter toutes les publications", "homegrade-theme__texte-fonctionel") ?></a>
|
$pagePublicationsUrl = get_page_by_template('template-publications.php') ? get_permalink(get_page_by_template('template-publications.php')[0]->ID) : null;
|
||||||
|
?>
|
||||||
|
<div class="card-large-content">
|
||||||
|
<div class="section_titling">
|
||||||
|
<h2 class="section_titling__title"><?php echo __("Publications suggérées", "homegrade-theme__texte-fonctionnel") ?></h2>
|
||||||
|
<p class="section_titling__subtitle"><?php echo __("Consultez notre documentation pour en savoir plus", "homegrade-theme__texte-fonctionnel") ?></p>
|
||||||
|
</div>
|
||||||
|
<ul id="brochures-rows" class="publications-grid">
|
||||||
|
<?php
|
||||||
|
get_template_part(
|
||||||
|
'template-components/archives/brochure-rows',
|
||||||
|
null,
|
||||||
|
array(
|
||||||
|
'brochuresPosts' => $suggestedPublications,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
<a class="cta cta--outline cta--button mx-auto" href="<?php echo $pagePublicationsUrl ?>"><?php echo __("Consulter toutes les publications", "homegrade-theme__texte-fonctionel") ?></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user