FEATURE Add new ACF block for displaying statistical data
This commit is contained in:
parent
07c526ce90
commit
8291a6d545
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
$allRevuesCount = wp_count_posts('revues')->publish;
|
||||||
|
$allArticlesCount = wp_count_posts('articles')->publish;
|
||||||
|
$allEtiquettesCount = wp_count_terms('etiquettes', ['hide_empty' => true]);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="statistics-datas content-section">
|
||||||
|
<li class="statistics-datas__item">
|
||||||
|
<div class="statistics-datas__item-icon">
|
||||||
|
<img src="<?php echo get_template_directory_uri(); ?>/resources/img/icons/icon-circle.svg" alt="Revues">
|
||||||
|
</div>
|
||||||
|
<span class="statistics-datas__item-number"><?php echo $allRevuesCount; ?></span>
|
||||||
|
<span class="statistics-datas__item-label">Revues</span>
|
||||||
|
</li>
|
||||||
|
<li class="statistics-datas__item">
|
||||||
|
<div class="statistics-datas__item-icon">
|
||||||
|
<img src="<?php echo get_template_directory_uri(); ?>/resources/img/icons/icon-rectangle-rotated.svg" alt="Revues">
|
||||||
|
</div>
|
||||||
|
<span class="statistics-datas__item-number"><?php echo $allArticlesCount; ?></span>
|
||||||
|
<span class="statistics-datas__item-label">Articles</span>
|
||||||
|
</li>
|
||||||
|
<li class="statistics-datas__item">
|
||||||
|
<div class="statistics-datas__item-icon">
|
||||||
|
<img src="<?php echo get_template_directory_uri(); ?>/resources/img/icons/icon-losange.svg" alt="Revues">
|
||||||
|
</div>
|
||||||
|
<span class="statistics-datas__item-number"><?php echo $allEtiquettesCount; ?></span>
|
||||||
|
<span class="statistics-datas__item-label">Etiquettes</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
Loading…
Reference in New Issue
Block a user