Having Problems with Relative Dates
-
Hi.
I love the plugin and have used it many times.
I’m just having a problem with using relative PHP dates in the loop, within a template.
This is code that I have used many times before, but for some reason I can’t get it to work on this occasion. I’m basically trying to find all the events for each month. So i use:
‘event_start_after’ => ‘first day of august’,
‘event_start_before’ => ‘last day of august’,in the $args for the loop. Usually this works fine, but all of the events are in every month.
Can you see anything wrong in the code?
<?php $args = array( 'order'=> 'ASC', 'orderby' => 'eventstart', 'post_type' => 'event', 'event_start_after' => 'first day of august', 'event_start_before' => 'last day of august', 'showpastevents' => true ); $the_query = new WP_Query( $args ); ?> <div class="cal_dates"> <?php if ( $the_query->have_posts()) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <!-- LOOP CONTINUES -->
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Having Problems with Relative Dates’ is closed to new replies.