Posts Older than 3 Days Not Showing
-
Alright, racked my brain on this one and I’m coming up short. Using a custom post type for the company’s Government Affairs section. For some reason, posts older than 3 days will not show up. Recently tried resetting the query (even though it’s the first one on the page). Any help would be amazing. Thanks.
<?php if(is_page('Government Affairs')): ?> <?php wp_reset_query(); // Reset Query // Display Custom Post Type $recent = new WP_Query('post_type=govt&posts_per_page=4'); $x=1; while($recent->have_posts()) : $recent->the_post(); ?> <?php $terms = get_the_terms($post->ID, 'govt-category'); foreach($terms as $item): if($item->slug != "govt_affairs_updates"): ?> <div class="post<?=($x%2 ? ' odd':' even')?>"><?php $x++;?> <h4><a href="<?=the_permalink()?>"><?=the_title()?></a></h4> <span class="author">Posted in <a href="#"><?=custom_post_taxonomy('govt-category')?></a> <?=relative_time()?></span> <p><?=the_excerpt()?> <a href="<?=the_permalink()?>" class="more"><?=more_text()?></a></p> </div> <?php endif; ?> <?php endforeach; ?> <?php endwhile; ?> <?php endif; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Posts Older than 3 Days Not Showing’ is closed to new replies.