JackWReid
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Okay, well I’ll be moving the site to live over the next few days, so I’ll keep the issue open and push you a link once it’s migrated, and we’ll see if it’s still having problems.
Forum: Fixing WordPress
In reply to: Display latest post from category *with slug*You’re right, all sorted. Thanks for your help!
Forum: Fixing WordPress
In reply to: Display latest post from category *with slug*So I have this code on a page now rather than a category, to simplify matters. It is spitting out posts in the correct quantity but it appears to just be spitting out all posts regardless of category. Any ideas?
<h4 class="center">This Week</h4> <?php $cat_id = 'event-previews'; $latest_cat_post = new WP_Query( array('posts_per_page' => 1, 'category__name' => array($cat_id))); if( $latest_cat_post->have_posts() ) : while( $latest_cat_post->have_posts() ) : $latest_cat_post->the_post(); ?> <h6 class="center"><?php the_title(); ?></h6> <div class="listings"> <?php the_content(); ?> </div> <?php endwhile; endif; ?>Forum: Themes and Templates
In reply to: Suddenly, only index.php rendersTurns out my nav URLs suddenly needed forward slashes at the end, so the links weren’t working properly and pointing to a location that wouldn’t render any template. Weird.
Viewing 4 replies - 1 through 4 (of 4 total)