Support » Fixing WordPress » can’t search

  • I’m not sure why it doesn’t work, but any word I try to search for gives me the same result:

    “Sorry, no posts matched your criteria.”

    If it were just for the search form on my blog, I’d say I messed around with the code, but the internal, Dashboard/manage search form tells me about the same:

    “No posts found.”

    And I didn’t mess around with that one 😉
    Where should I start looking? Seems like nobody in the support forums had a similar problem, or at least I couldn’t find any predecessors (the search form here is slightly difficult to use)

Viewing 6 replies - 1 through 6 (of 6 total)
  • You mean the theme came that way? And in frames?
    Does the theme have a search.php?

    Thread Starter grendels

    (@grendels)

    Oops, I totally forgot to provide basic info, sorry about that:
    Wordpress 1.5.2
    Theme: modified Flex (Phu Ly) theme
    http://www.iroke.de/wp

    The theme was provided with the same handful of files I use right now as well, I primarily changed design details. The theme does not have a search.php, the original zip didn’t have one… is one neccessary?

    Not sure what you mean with “in frames”.

    There’s no connection between a theme’s search and the “search posts” one in the Dashboard/manage section, right? I mean, the Dashboard search function doesn’t work either, but possibly out of a different reason?

    I was trying to look at your source and noticed you’ve created frames for your site. If there is no search.php then I believe WP still performs the search out of the index file. How much have you edited that file?

    Thread Starter grendels

    (@grendels)

    Frames, on http://www.iroke.de/wp ?? There’re no frames, no tables, the layout is css and some content inbetween…?

    I haven’t modified the wp installation except wp-blog-headers.php (commented out the part that controls 404 messages, otherwise wp wouldn’t work at all)

    The wp index.php contains only

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    the theme’s index.php contains

    <?php
    get_header();
    ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <p style="text-align: center;">
    <?php
    if ($single) {
    previous_cat_post($beforeGroup=' &#171 ', $afterGroup=' | ', $beforeEach='', $afterEach=' ', $showtitle=true, $textForEach='');
    ?>
    <a href="<?php bloginfo('url'); ?>">Main</a>
    <?php
    next_cat_post($beforeGroup=' | ', $afterGroup=' » ', $beforeEach='', $afterEach=' ', $showtitle=true, $textForEach='');
    }
    ?>
    </p>
    <div class="entry">
    <!--
    <h2 class="entrydate"><?php the_date() ?></h2>
    -->
    <h3 class="entrytitle" id="post-<?php the_ID(); ?>">
    <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title('-image-');?></a>
    </h3>
    <div class="entrybody">
    <div class="entrydate"><?php the_time('F dS Y') ?></div>
    <?php the_content(__('(more...)')); ?>
    <div class="entrymeta">Posted in <?php the_category(',') ?>&nbsp;&nbsp;<!--<p class="comments_link">-->
    <?php $comments_img_link = '<img src="' . get_stylesheet_directory_uri() . '/images/comments.gif" title="comments" alt="*" />'; comments_popup_link('No Comments', $comments_img_link . ' 1 Comment', $comments_img_link . ' % Comments'); ?>
    </div>
    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    </div>
    <?php comments_template(); // Get wp-comments.php template ?>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    </div>
    </div><!-- The main content column ends -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Your preferences link http://grabic.name/ is in frames which is the only link I had initially.

    I tested the index page you posted on my site and it worked fine. Perhaps someone else will have some idea as to why it doesn’t work on yours.

    Until someone responds, though, you could switch temporarily to the default theme and see if it works there. Then we would have more to go on.

    Thread Starter grendels

    (@grendels)

    Oh, didn’t know 1&1 used frames for the domain, my error (and I should have been already writing the url in the first post, too). I just switched to the default theme, but search (and Dashboard search) still don’t find any messages.

    There’s one more thing that came to my mind: When I started to switch to WP quite a while ago, I had to comment out Process PATH_INFO and 404 in wp-blog-header.php because otherwise all pages wouldn’t work and I’d get a
    404 on all pages. The reason why I had to do it: I have no idea, I was searching for an answer but was unable to find one (more info at http://wordpress.org/support/topic/36592). Several people in the IRC help channel tried to help, and someone got the idea to comment the above mentioned part of the code out, it worked. I don’t know if this is related to the search issue, but it might be better to mention it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘can’t search’ is closed to new replies.