When I tried removing this line <?php query_posts( array( 'cat' => -65, 'paged' => get_query_var('paged') ) ); ?> my search worked but my pagination would be affected too.
Is there anything I need to do? I hope someone can help
$searchquery = trim( get_search_query() ); echo "<p>Please try searching again by entering one or two words on the subject that you are trying to find more information on.</p>";
} ?>
<?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?>
I have a site I'm currently working on but when I tried doing a search it didn't worked. Here's the code of from the index.php file:
<!-- START OF POSTS -->
<?php query_posts( array( 'cat' => -65, 'paged' => get_query_var('paged') ) ); ?>
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<div class="post">
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<?php wp_reset_query();?>
<?php endif; ?>
<!-- END OF POSTS -->
<?php wp_pagenavi(); ?>
When I tried removing this line <?php query_posts( array( 'cat' => -65, 'paged' => get_query_var('paged') ) ); ?> my search worked but my pagination would be affected too.
Is there anything I need to do? I hope someone can help
Thanks guys! :)
Val
My search area is located in the sidebar.php
Can you tell me why I should create a search.php file?
Thanks!
Val