You would need to turn your search form into a plugin.
thanks for the idea…
Actually my search form is working now.. I put this code in my search.php
<?php if (have_posts()) { while (have_posts()) : the_post(); ?>
<div>
<h3><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?> from <?php echo get_post_type(); ?></a></h3>
<?php the_excerpt(); ?>
</div>
<?php endwhile; } else { ?>
<p><?php _e('Nothing found, what meets your criteria.', 'basis'); ?></p>
<?php } ?>
My only problem is my search result. I don’t want pages to include on my results. Just posts only.
Then exclude them using the is_page() conditional.
<?php if (have_posts()) { while (have_posts()) : the_post(); if( !is_page() ) :?>
<div>
<h3><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?> from <?php echo get_post_type(); ?></a></h3>
<?php the_excerpt(); ?>
</div>
<?php endwhile; } else { endif;?>
<p><?php _e('Nothing found, what meets your criteria.', 'basis'); ?></p>
<?php } ?>
no success… there is an error to your code.. i tried to transfer the endif; before the endwhile; like this:
<?php endif; endwhile; } else { ?>
there is no error but the pages are still included… :[