45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
|
|
$args = array(
|
|
'post_type' => 'jobs',
|
|
'posts_per_page' => -1,
|
|
'status' => 'publish',
|
|
);
|
|
|
|
$offresEmplois = new WP_Query($args);
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
<section <?php echo get_block_wrapper_attributes(["class" => "homegrade-blocks-offres-emplois"]); ?>>
|
|
<?php echo $content; ?>
|
|
|
|
<ul class="homegrade-blocks-offres-emplois__offres-grid-datas">
|
|
|
|
<div class="table_head">
|
|
<p><?php echo __("Poste", "homegrade-blocks__texte-fonctionnel") ?></p>
|
|
<p><?php echo __("Offre", "homegrade-blocks__texte-fonctionnel") ?></p>
|
|
</div>
|
|
<?php foreach ($offresEmplois->posts as $offre) : ?>
|
|
<?php
|
|
$contractType = get_field("contract_type", $offre->ID) ? get_field("contract_type", $offre->ID)['label'] : null;
|
|
$offrePermalink = get_the_permalink($offre->ID);
|
|
get_the_content($offre->ID);
|
|
?>
|
|
<li class="homegrade-blocks-offres-emplois__offre">
|
|
<p class="homegrade-blocks-offres-emplois__offre-title"><a href="<?php echo $offrePermalink ?>"><?php echo $offre->post_title ?></a></p>
|
|
<p class="homegrade-blocks-offres-emplois__offre-type"><?php echo $contractType ?></p>
|
|
<a class="homegrade-blocks-offres-emplois__offre-download cta cta--secondary cta--button" href="<?php echo $offrePermalink ?>"><?php echo __("Consulter l'offre", "homegrade-theme__texte-fonctionnel") ?></a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|
|
|
|
</section>
|