<?php
/**
 * Felicityhealth - Event Category Archive page
 *  
 * The template for displaying FelicityhealthEvent Category pages
 * @package Felicityhealth
 * @since Felicityhealth 1.0
 */
?>
<?php get_header(); ?>

<?php
 
$args = array(
    'type' => 'event',
    'orderby' => 'name',
    'order' => 'ASC',
    'taxonomy' => 'event_cat');
    $categories = get_categories( $args );
    // var_dump($categories[0]->category_nicename);
//     echo $categories[0]->category_nicename;
// ?>
<style>
.event h5,
.event .h5 {
    font-size: 15px;
}

.event .bd-placeholder-img {
    font-size: 15px;
}

.zulu-post-thumbnail {
    width: 100%;
    height: 200px;
    background: rgb(84, 89, 92);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}


.event .card {
    width: 100%;
}
.vsel-content .vsel-meta-link{
    color: #dd391a !important;
    text-transform: uppercase !important;
}
</style>



<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">
                <h2 class="container pl-5"> <?php echo __( 'Events', 'zulured' ) ?></h2>
                <ul id="zulu-blog-categories-list"
                    class="zulu-blog-categories-list list button-group filter-button-group">
                    <li><a href="" class="filter-link" data-filter="*"><?php echo __( 'All', 'zulured' ) ?></a>
                    </li>

                    <?php foreach( $categories as $category ) { ?>
                     <?php //get_category_link( $category->term_id ) ?>
                    <li>
                        <span>⁄</span>
                        <a href="" data-filter=".<?=  esc_html( $category->slug) ?>"
                            class="filter-link"><?= 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 event">
        <div class="row grid">
            <?php  if ( have_posts() ) : ?>
            <?php while ( have_posts() )  : the_post(); ?>
            <?php get_template_part( 'template-parts/content-event-loop' );?>
            <?php endwhile; ?>
            <?php endif; ?>
        </div><!-- .row -->
    </section>
</main>
<?php get_footer(); ?>

