$5
Listing Category Posts Interferes with Static Page Content
I have 2 pages (one for each section) that intend to be a 'jumping-off' point to posts in the website. I used the following code to list the recent posts in the category:
When there is a post in the category, it replaces the original page text.
When there isn't posts in the category, it shows the original page text.
What I want to do is have the category listing on the right, but keep the original page text on the left at all times (in this case, the 'Put text here' and whatnot).
Here's the page source code.
<ul class="sidebar">
<?php $recent = new WP_Query("cat=3&showposts=10"); while($recent->have_posts()) : $recent->the_post();?>
<li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>When there is a post in the category, it replaces the original page text.
When there isn't posts in the category, it shows the original page text.
What I want to do is have the category listing on the right, but keep the original page text on the left at all times (in this case, the 'Put text here' and whatnot).
Here's the page source code.
Matt Hancock | 02/06/10 at 9:05pm |
Answers | Tags
(2) Possible Answers Submitted...
You must be logged in to view answers or answer this question.



