This repository has been archived on 2024-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
2023-03-12 16:15:46 +01:00
|
|
|
<?php
|
|
|
|
$parent_categories = get_categories( array(
|
|
|
|
'orderby' => 'slug',
|
|
|
|
'order' => 'ASC',
|
|
|
|
'parent' => 0
|
|
|
|
) );
|
2020-12-30 21:27:12 +01:00
|
|
|
|
2023-03-12 16:15:46 +01:00
|
|
|
foreach( $parent_categories as $parent_category ) {
|
|
|
|
?>
|
|
|
|
<div class="card card-primary">
|
|
|
|
<div class="card-header"><i class="fa fa-folder" aria-hidden="true"></i> <?php echo $parent_category->name ?></div>
|
|
|
|
<ul class="card-menu">
|
|
|
|
<?php
|
|
|
|
$categories = get_categories( array(
|
|
|
|
'orderby' => 'slug',
|
|
|
|
'order' => 'ASC',
|
|
|
|
'parent' => $parent_category->term_id
|
|
|
|
) );
|
|
|
|
|
|
|
|
foreach( $categories as $category ) {
|
|
|
|
if ($category->slug != "chapters") {
|
|
|
|
echo '<li><a class="menu-element" href="' . get_category_link($category->term_id) . '">' . $category->name . '<span class="menu-label label-secondary">'. $category->count . '</span></a></li>';
|
|
|
|
}
|
2020-12-31 12:33:38 +01:00
|
|
|
}
|
2023-03-12 16:15:46 +01:00
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|