pacothelovetaco
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Using multiple loops and displaying them chronologicallyThank you for your help. I decided to do things a different way and restructure the design. The solution I came up with is easier and makes more sense.
Forum: Fixing WordPress
In reply to: Using multiple loops and displaying them chronologically<?php $args=array( 'category__in' => array(1,2,3,4), 'posts_per_page' => 4, 'orderby' => 'post_date', 'order' => 'DESC' ); $wp_query->query($args); ?>
I have this, but here is where I am lost. Is it possible to show 1 post from each category, and whichever post is the most recent has to be at top? For instance, only one post is shown for category 1,2,3,4. But category 2 has the most recent post and needs to be at the top. I’m wondering if it’s even possible doing it this way.
Forum: Fixing WordPress
In reply to: Using multiple loops and displaying them chronologicallySorry, I think we are posting at the same time. After you sent your links, it was the insight that I needed. I wanted to get rid of that embarrassing code before anyone else saw it.
Forum: Fixing WordPress
In reply to: Using multiple loops and displaying them chronologicallyPeter_L, I think you got it. I’m playing with the new code now.
Forum: Themes and Templates
In reply to: Submitting comments within a facebox windowNothing?
Forum: Themes and Templates
In reply to: Using subpages breaks my sidebar codeI knew it was something like that. Thank you for the second set of eyes Twelvefootsnowman.
Forum: Fixing WordPress
In reply to: blank page after comment is submittedHopefully this will be a solution for some of you. I was having the same problem. However comments worked in the default WP theme, it just would not work in my theme. Comparing the two themes, I found that my single.php template was missing
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
After I added it, everything worked fine. So check if you are calling the loop in this way:<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div> YOUR POSTS CONTENT </div> <?php comments_template(); ?> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> </div> <?php get_footer(); ?>
I have a feeling this is the correct way to do it. I rarely looked at the documentation when I learned to use WP. Hope this helps for someone, and it isn’t my own isolated newbie mistake.