Wordpress: How to make search work?

  • fyntas
  • Newbie
  • Newbie
  • fyntas
  • Posts: 10

Post 3+ Months Ago

Hello there,

How to make search work in categories that are not displayed on the front page?

I ran into this strange problem using wordpress. In my main index template I added this line:

Code: [ Select ]
<?php query_posts ($query_string . '&cat=6'); ?>

so now one part of it looks like this:

Code: [ Select ]
<?php query_posts ($query_string . '&cat=6'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  1. <?php query_posts ($query_string . '&cat=6'); ?>
  2. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

This line helps me to show only ONE category posts in a front page. It all works fine, but the problem is, the search only works in that particular category, which is shown on the front page. In other categories search does not work, for example when you search a word that is in a different categories post, you get nothing. You can only search a word that is in a category shown on a front page.

How to fix this problem?

Thanks, awaiting for your answers...
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 78 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.