fallback when no posts found
This commit is contained in:
parent
af0f8dea42
commit
9d9e79749b
|
|
@ -12,7 +12,6 @@ $queryArgs = array(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$pressPosts = new WP_Query($queryArgs);
|
$pressPosts = new WP_Query($queryArgs);
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
|
|
@ -46,6 +45,9 @@ $newsTemplatePage = get_pages($args) ? get_pages($args)[0] : null;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
<?php if ($pressPosts->found_posts === 0) : ?>
|
||||||
|
<p class="no-posts-found"> <?php echo __("Pas de communiqué de presse actuellement", "homegrade-theme__texte-fonctionnel") ?> </p>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($pressPosts->max_num_pages > 1) : ?>
|
<?php if ($pressPosts->max_num_pages > 1) : ?>
|
||||||
<a class="cta cta--outline cta--button mx-auto" href="<?php echo get_permalink($newsTemplatePage) ?>">
|
<a class="cta cta--outline cta--button mx-auto" href="<?php echo get_permalink($newsTemplatePage) ?>">
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,4 @@
|
||||||
/*!***************************************************************************************************************************************************************************************************************************************************!*\
|
/*!***************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
|
!*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
|
||||||
\***************************************************************************************************************************************************************************************************************************************************/
|
\***************************************************************************************************************************************************************************************************************************************************/
|
||||||
/**
|
|
||||||
* The following styles get applied both on the front of your site
|
|
||||||
* and in the editor.
|
|
||||||
*
|
|
||||||
* Replace them with your own styles or remove the file completely.
|
|
||||||
*/
|
|
||||||
.wp-block-create-block-test {
|
|
||||||
background-color: #21759b;
|
|
||||||
color: #fff;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*# sourceMappingURL=style-index.css.map*/
|
|
||||||
|
|
@ -12,7 +12,6 @@ $queryArgs = array(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$pressPosts = new WP_Query($queryArgs);
|
$pressPosts = new WP_Query($queryArgs);
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
|
|
@ -46,6 +45,9 @@ $newsTemplatePage = get_pages($args) ? get_pages($args)[0] : null;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
<?php if ($pressPosts->found_posts === 0) : ?>
|
||||||
|
<p class="no-posts-found"> <?php echo __("Pas de communiqué de presse actuellement", "homegrade-theme__texte-fonctionnel") ?> </p>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($pressPosts->max_num_pages > 1) : ?>
|
<?php if ($pressPosts->max_num_pages > 1) : ?>
|
||||||
<a class="cta cta--outline cta--button mx-auto" href="<?php echo get_permalink($newsTemplatePage) ?>">
|
<a class="cta cta--outline cta--button mx-auto" href="<?php echo get_permalink($newsTemplatePage) ?>">
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
/**
|
|
||||||
* The following styles get applied both on the front of your site
|
|
||||||
* and in the editor.
|
|
||||||
*
|
|
||||||
* Replace them with your own styles or remove the file completely.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.wp-block-create-block-test {
|
|
||||||
background-color: #21759b;
|
|
||||||
color: #fff;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user