Support » Fixing WordPress » Search bar not working :(

  • Resolved viltnieks


    Hi, I have a little problem with my themes search bar. Since I’m using WP to display just pages, not for blogging. I suppose It may cause the problem.

    When I use search box (upper right corner), I always get this ‘Sorry, but you are looking for something that isn’t here.’ even if I’m searching for the same name as a page name.

    Could it be possible to reconfigure this search box so it searches through page contents ?


Viewing 15 replies - 1 through 15 (of 18 total)
  • Thank you,

    But I still can’t get this to work, after installing plug-in and navigating to options I can choose every option except search every page, despite the fact that there is such section in screen shot of this plug in .

    What exactly is the search code you are using in your theme? And try switching to the default theme and do a search and see what happens.

    <!– begin search box –>
    <form id=”searchform” action=”” method=”get”>
    <input id=”s” type=”text” name=”s” value=””/>
    <input id=”searchsubmit” type=”submit” value=””/>
    <!– end search box –>

    this is the search code

    I’m sorry for bringing this up again, but I would really like to solve this problem.

    I tried various plug-ins but none of them helped. I don’t use default theme, and I use WP as a web site not a blog. All I want is for a search bar that just searches keywords through my site’s page content. I tried various plug-ins and many settings, but when I try to search something I get “Sorry, but you are looking for something that isn’t here.”

    I red documentation for plug-ins. But I haven’t had luck 🙁

    Theme I’m using isn’t nothing special, and I think it shouldn’t be hard to make this work, sadly I just don’t know how 🙁

    Thank you in advance!

    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>" style="padding:0px 0px 0px 0px; margin:0px 0px 0px 0px">
    					<input type="text"  name="s" id="s" value="<?php echo wp_specialchars($s, 1); ?>"/><input class="input" type="image" src="<?php bloginfo('stylesheet_directory'); ?>/images/search.png" value="submit" style="border:0px"/>

    is my search form code….dunno if any of it helps ya

    I tried using your code, but I still have the same problem 🙁

    I have a plugin enabled at the moment if you do a search in my search bar, you will get a nothing found error, but if you press “sākums” on upperl left, search results will appear.

    You can try doing a search for “mājas lapas” is my site and then pressing “sākums” on upper left, you’ll see what I’m talking about.

    my site

    here’s a couple things to try

    have you tested with NO plugins active?

    Also, set your permalinks back to default and test

    Yes, I’ve tested with no plugins ,got same nothing found error.

    And with permaling back to default, I get exactly the same error 🙁

    I tried using default theme, with no plugins and search worked just like I would like it to work 🙂

    But could someone please take a look at my site and tell me what could be the problem with this particular theme and search not working with it ?

    Thank you.

    Do you have anything other than the standard loop:

    <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
    <?php endwhile; ?>
    <?php else : ?>
    <?php endif : ?>

    in search.php?

    Yes, it goes like this:

    <?php if (have_posts()) : while (have_posts()) : the_post();if ($post->post_type=='page') continue; ?> 
    <?php the_content(__('Read more &raquo;')); ?>
    <?php the_time('F j, Y') ?> &nbsp;&nbsp;//&nbsp;&nbsp; <?php the_category(', ') ?> &nbsp;&nbsp;//&nbsp;&nbsp; <?php comments_popup_link('No Comments', '1 Comment ', '% Comments'); ?> &nbsp;&nbsp;//&nbsp;&nbsp; <?php the_tags('Tags: ', ', ', ''); ?> 
    <?php endwhile; ?>
    <?php else : ?>
    <?php endif; ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    What is this for? if ($post->post_type=='page') continue; ?>

    Try the standard loop intro

    <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>

    and see if search works.

    Whoever made this theme I’m using probably added this.

    I tried standard loop as you suggested and it works.

    I’m very grateful ! Thank you.

    Glad that works. I made the same mistake once, using a slightly off-standard loop.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Search bar not working :(’ is closed to new replies.