So I'm trying to create a Wordpress Category landing page (category.php) that lists all the articles for a specific category. For some reason, my category.php loop is returning empty (even though articles do exist in the category I clicked on). I've checked a ton of tutorials on how to create this page and my code matches them all, so not sure why this is happening.
Side note, the way my Wordpress is set up is that there are categories under each Custom Post Types.
Any help? Thank you!
<?php get_header(); ?>
<div class="container-fluid cat-landing">
<!--Logic for Category Listings-->
<div class="row">
<?php
// Check if there are any posts to display
if ( have_posts() ) : ?>
<h2 class="title"><?php single_cat_title(); ?> Category</h2>
<?php
// The Loop
while ( have_posts() ) : the_post();
?>
<div class="col-md-3 latest-post post-listing">
<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'thumbnail' ); ?>
<a href="<?php the_permalink() ?>" class=""><img src="<?php echo $url ?>" /></a>
<div class="desc">
<a href="<?php the_permalink() ?>"><?php the_title();?></a>
</div>
</div>
<?php endwhile; wp_reset_query(); ?>
<?php endif; ?>
</div>