25 lines
1.0 KiB
PHP
25 lines
1.0 KiB
PHP
<?php
|
|
|
|
|
|
$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"><?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>
|