I'm needing a couple queries on front-page.php and am at a loss why this is not working. My first query works fine, however, my second one specifying the category (or even nothing at all) never returns anything. Any ideas?
<div class="row">
<div class="details">
<?php
if (have_posts()) : while (have_posts()) : the_post();
the_content();
endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php
endif;
wp_reset_postdata(); ?>
<?php
$secondary_query = new WP_Query( 'category_name=students' );
echo '<ul>';
if ($secondary_query->have_posts()) : while ($secondary_query->have_posts()) : $secondary_query->the_post();
echo '<li>' . get_the_title() . '</li>';
endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php
echo '</ul>';
endif;
wp_reset_postdata(); ?>
<ul>
</div>
students
, and that there are posts attached to it? Saying "it is failing" is a bit too broad, there's no way we can diagnose the problem without more information. Have you tried disabling plugins?