<?php get_header(); ?>
<?php
$categories = get_the_category();
$category = $categories[0];
?>

<div class="container-fluid-blog main-content-wrap" role="main">
  <ul class="breadcrumb">
    <li><a href="<?php echo get_site_url(); ?>/tips-inspiration">Tips & Inspiration</a> | </li>
    <?php display_bc($category->category_parent); ?>
    <?php display_bc(1); ?>
  </ul>
  <div class="blog-content-area">
    <div class="container-blog ">
      <div class="row">
        <div class="col-md-12 col-lg-12">
          <section id="content">
            <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
              <section class="category">
                <div class="page-content">
                  <!-- Start rows of Three Posts -->
                  <div class="card-row">
                    <?php wp_reset_query(); ?>

                    <?php
                    if (have_posts()) : while (have_posts()) : the_post();
                        // post stuff... 
                    ?>
                        <div class="card-article">
                          <div class="article-header">
                            <div class="img-fit">
                              <div class="article-featured">
                                <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                                  <?php the_post_thumbnail('full'); ?>
                                </a>
                              </div>
                              </a>
                            </div>
                            <div class="card-content">
                              <div class="cat-label">
                                <?php
                                $categories = get_the_category();
                                if (!empty($categories)) {
                                  echo '<a href="' . esc_url(get_category_link($categories[0]->term_id)) . '">' . esc_html($categories[0]->name) . '</a>';
                                }
                                ?>
                              </div>
                              <h2 data-role="article-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                                  <?php the_title(); ?>
                                </a> </h2>
                              <div class="article-date">
                                <?php $post_date = get_the_date('F j, Y');
                                echo $post_date; ?>
                              </div>
                              <div class="article-readmore"> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">View Article &#8594;</a> </div>
                            </div>
                          </div>
                        </div>

                    <?php
                      endwhile;
                    endif;  ?>
                  </div>
                  <?php
                  wp_reset_postdata();
                  ?>
                  <!-- END rows of Three Posts -->
                </div>
              </section>
            </article>
          </section>
        </div>
      </div>
    </div>
  </div>
</div>

<?php get_footer(); ?>