handling when no jobs

This commit is contained in:
Antoine M 2023-11-29 20:20:59 +01:00
parent 0063545bbc
commit 65a8769861
3 changed files with 47 additions and 51 deletions

File diff suppressed because one or more lines are too long

View File

@ -8,15 +8,14 @@ $args = array(
$offresEmplois = new WP_Query($args);
?>
<section <?php echo get_block_wrapper_attributes(["class" => "homegrade-blocks-offres-emplois"]); ?>>
<?php echo $content; ?>
<?php if (!$offresEmplois->have_posts()) : ?>
<p><?php echo __("Il ny a pas de poste à pourvoir en ce moment.", "homegrade-theme__texte-fonctionnel") ?></p>
<?php endif; ?>
<?php if ($offresEmplois->have_posts()) : ?>
<ul class="homegrade-blocks-offres-emplois__offres-grid-datas">
<div class="table_head">
@ -35,11 +34,10 @@ $offresEmplois = new WP_Query($args);
<a class="homegrade-blocks-offres-emplois__offre-download cta cta--secondary cta--button" href="<?php echo $offrePermalink ?>"><?php echo __("Consulter l'offre", "homegrade-blocks") ?></a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</section>

View File

@ -8,15 +8,14 @@ $args = array(
$offresEmplois = new WP_Query($args);
?>
<section <?php echo get_block_wrapper_attributes(["class" => "homegrade-blocks-offres-emplois"]); ?>>
<?php echo $content; ?>
<?php if (!$offresEmplois->have_posts()) : ?>
<p><?php echo __("Il ny a pas de poste à pourvoir en ce moment.", "homegrade-theme__texte-fonctionnel") ?></p>
<?php endif; ?>
<?php if ($offresEmplois->have_posts()) : ?>
<ul class="homegrade-blocks-offres-emplois__offres-grid-datas">
<div class="table_head">
@ -35,11 +34,10 @@ $offresEmplois = new WP_Query($args);
<a class="homegrade-blocks-offres-emplois__offre-download cta cta--secondary cta--button" href="<?php echo $offrePermalink ?>"><?php echo __("Consulter l'offre", "homegrade-blocks") ?></a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</section>