tomconte
Forum Replies Created
-
You’re right, that is certainly the reason why. Thanks!
Forum: Plugins
In reply to: List Posts with Certain Tag by Month/YearWhat’s the proper way of excluding the current month from display? I have it set up like this:
<? foreach(array_slice($months,1) as $this_month) : ?>Not sure if I will experience problems down the road due to the array becoming larger over time. Any suggestions? I’m curious to see if there is a better way.
Forum: Fixing WordPress
In reply to: Post Dates that indicate Today, Yesterday, or the post dateFancy I see you here. It seems we both are pondering the same thing. Well, I found a solution although I’m having problems with actual date it is interpreting (today is the 21st, but all of sudden it’s declaring itself as tomorrow 22nd).
Anyways, here is what I have to display posts published for “Today”:
// Capture today's date $today = getdate(); // Set WP Query arguments $argsT = array( 'cat'=>3, 'year'=>$today["year"], 'monthnum'=>$today["mon"], 'day'=>$today["mday"] ); // Create a new instance of the object $todayQuery = new WP_Query($argsT); // Loop through posts published "Today" <?php if ($todayQuery->have_posts()) : ?> <?php while ($todayQuery->have_posts()) : $todayQuery->the_post(); ?> <a href="<?php echo $link; ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> <?php endwhile; ?>My only problem is the getdate() function is much faster than what the actual time is….not sure why but I’m still figuring that out.