Displaying posts from THE DAY BEFORE
-
I am trying to find out the best way to display the latest posts from the day before.
Currently, I am using the method shown in CODE1 (see below).
So, here are my questions…
1. Are there any other ways of accomplishing the same thing? Perhaps better than what I’m doing.
2. Is there anything wrong with my current method? The code works fine right now, but does anyone see any possible errors it might encounter?
Thanks.
—– CODE1 ————————————
<?php
/* yesterday’s headlines */
Function yesterdayHeadlines(){
$current_day = date(‘d’)-1;
$current_month = date(‘m’);
$current_year = date(‘Y’);
query_posts(“cat=-63&year=$current_year&monthnum=$current_month&day=$current_day&orderby=date&order=DESC”);
?>The Loop goes here
<?php } ?>
- The topic ‘Displaying posts from THE DAY BEFORE’ is closed to new replies.