Search Function and Query Posts Conflict
-
Hello everyone,
Heres the issue at hand.
ive got a search function at the beginning of the page and later down ive got a query function that basically pulls out the latests posts from a specific category. However when i do a search, it displays all the results in that category for no reason.
But when i remove the query function, the search function works perfectly.
The search code is the default that usually comes with wordpress and the custom display specific category code is as follows:
<?php query_posts('cat=3&showposts=5'); ?> <ul> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li> <?php endwhile;?> </ul>
It seems as if that code needs to be closed somewhere.
Could someone help me figure this out.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Search Function and Query Posts Conflict’ is closed to new replies.