How to show posts where post date >= date('n',current_time('timestamp')) ?
How to show posts where post date >= date('n',current_time('timestamp')) ?
Anybody knows how to do it?
I do this
<?php $recent = new WP_Query("orderby=post_date&order=desc"); while($recent->have_posts()) : $recent->the_post();?>
<?php if ( (current_time(timestamp) - get_the_time('U') - (get_settings('gmt_offset') * 3600) ) < (3*(60*60*24))) { ?>
<!-- content -->
<?php } endwhile; ?>
sorry, this:
<?php $recent = new WP_Query("orderby=post_date&order=desc"); while($recent->have_posts()) : $recent->the_post();?>
<?php if ( (current_time(timestamp) - get_the_time('U') - (get_settings('gmt_offset') * 3600) ) < (3*(60*60*24))) { ?>
<!-- content -->
<?php } endwhile; ?>
But I do find that it is a little finiky if you do it twice in one php page... but have at it!
(3*(60*60*24))) is the time...
it is in seconds (60 sec * 60 min * 24 hours) * 3 days
This topic has been closed to new replies.