Weird thing happening with showing one category list
-
I’m having some strange things happen when I’m trying to have a list of the five latest titles from one category in the footer.
Currently I have
<div class="footbox2"> <h3 class="previousarticles">Previous Articles</h3> <?php query_posts("category=7&showposts=5"); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <ul><li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> <?php else : ?> <li>There are currently no news posts.</li> <?php endif; ?> </ul> <hr /> <p>If you cannot see what you are looking for you can check the <a href="https://77pixels.com/archive">archives</a>, use the <a href="https://77pixels.com/search">search</a> (just to the left) or <a href="https://77pixels.com/contact">contact me</a> directly & I promise I'll get back to you as soon as I can, Suleiman. </p> </div><!-- footbox2 -->
Now the key thing here is
<?php query_posts("category=7&showposts=5"); ?>
I know it is meant to be..
<?php query_posts('cat=7&showposts=5'); ?>
But whenever I do that the page just shows up as a blank white web page with no source (weird). The code I have though works showing 5 posts, but they are from ALL categories which is the problem ??So basically I want this problem to get sorted and I have no idea what to do, as all the info just tells me to put the code that makes the page vanish.
Any help would be great, thanks
- The topic ‘Weird thing happening with showing one category list’ is closed to new replies.