This question already has an answer here:
<?php if ( have_posts() ) : ?> <?php // Start the loop. while ( have_posts() ) : the_post(); get_template_part( 'content', get_post_format() ); // End the loop. endwhile; else : get_template_part( 'content', 'none' ); endif; ?>
A simple loop her eon my index page. I am using the No Future Posts plugin to publish posts with dates in the future but the most relevant ones are today.
I have been doing a ton of cutting and pasting code from around the net trying to find a way to get just todays posts to show but nothing is sticking. I'm sure I need to check for todays date then put it into the loop but I have no idea how to do that, I know very little php, I usually just copy and paste other peoples code.
If any of the experts on here could maybe point me in the right direction it would be appreciated.!