<?php
/**
 * Template Name: Felicity Health - Projects Template
 *  
 * The template for displaying FelicityhealthProjects/Portfolio pages
 * @package Felicityhealth
 * @since Felicityhealth 1.0
 */
?>
<?php get_header(); ?>

<?php
 
$args = array(
    'type' => 'portfolio',
    'orderby' => 'name',
    'order' => 'ASC',
    'taxonomy' => 'portfolio_category');
    $categories = get_categories( $args );
?>



<section class="container u-content-space u-bg-arrow-wrapper zulu-blog-categories pb-4">
    <div class="row">
        <div class="col-xs-12">
            <div class="zulu-blog-categories-wrap">
                <ul class="zulu-blog-categories-toggle d-none">
                    <li><a href="#" id="zulu-blog-categories-toggle-link">Categories</a> <em
                            class="count"><?= count($categories)?></em></li>
                </ul>
                <ul id="zulu-blog-categories-list" class="zulu-blog-categories-list list">
                    <li><a
                            href=" <?= get_permalink( get_option( 'page_for_posts' ) ) ?>"><?php echo __( 'All', 'zulured' ) ?></a>
                    </li>
                    <?php foreach( $categories as $category ) { ?>
                    <li>
                        <span>⁄</span>
                        <a href="<?= get_category_link( $category->term_id ) ?>"><?= esc_html( $category->name) ?></a>
                    </li>
                    <?php }  ?>
                </ul>
            </div>
        </div>
        </sec>
</section>
<main role="main">
    <section class="container u-content-space u-bg-arrow-wrapper pt-4">
        <div class="row">
            <?php  if ( have_posts() ) : ?>
            <?php while ( have_posts() )  : the_post(); ?>
            <?php get_template_part( 'template-parts/content-project' );?>
            <?php endwhile; ?>
            <?php endif; ?>
        </div><!-- .row -->
    </section>
</main>
<?php get_footer(); ?>