query_posts() stopped working
-
I’m trying to display a specific second post on a page, and it was working fine before, and all of a sudden, it just stopped.
I double checked my backup, and they’re identical (I never touched the main page – only was fixing CSS issues). WordPress is processing the first post fine, but it suddenly stopped performing the query for the second post. I also checked the source code, and there’s no output of text that’s being hidden – so it’s not a CSS issue.
Any ideas??
Here’s the code for the first and second loops:
<div id="secondary-upper1"> <!-- Start the Loop. --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- Display the Title as a link to the Post's permalink. --> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <!-- Display the Post's Content in a div box. --> <div class="entry"> <?php the_content(); ?> </div> <!-- Stop The Loop (but note the "else:" - see next line). --> <?php endwhile; else: ?> <!-- The very first "if" tested to see if there were any Posts to --> <!-- display. This "else" part tells what do if there weren't any. --> <p>Sorry, no posts matched your criteria.</p> <!-- REALLY stop The Loop. --> <?php endif; ?> </div> <div id="secondary-upper2"> <?php query_posts('p=130'); if(have_posts()) : the_post(); ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_content(); ?> <?php endif; ?> </div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘query_posts() stopped working’ is closed to new replies.