Forums

WP's Search function not working properly (5 posts)

  1. ben_daniels
    Member
    Posted 1 year ago #

    I have noticed that on all my WP blogs the search function does not work properly. Namely, if I search for some keyword that appears in many posts (so that all results can't fit onto one page), I will get the first page of results and this page is OK.

    But when I click "Previous entries" at the bottom of that page in order to get the second page of results with that particular keyword, I get the following error:

    -----------------------------
    No Results Found

    The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.
    -----------------------------

    Perhaps I should point out that the first page of results has the correct URL format, such as (assuming I was searching for the keyword "cloud"):

    http://www.mydomain.com/?s=cloud

    However, the second page of results (the link "Previous entries") has the following format:

    http://www.mydomain.com/page/2/?s=cloud?s=cloud

    this appears on the status line in the browser when I put the cursor on the link. But if I copy the link and paste it into notepad, the URL looks like this:

    http://www.roughstraightmen.com/page/2/?s=cloud%3Fs%3Dcloud

    Could someone help me fix this problem?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-specific problems?

  3. ben_daniels
    Member
    Posted 1 year ago #

    I have just tried both things you suggested and unfortunatelly it didn't help. I think this issue is due to WordPress itself.

    The only thing that comes to mind is that I changed Permalinks and .htaccess accordingly. The new permalinks settings work well, even for older posts to which visitors are referred from Google. I did it with the help of the plugin called "Dean's Permalinks Migration".

    However I don't think this should affect the search function.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try resetting your custom permalinks back to the default setting and deleting/renaming your WordPress .htaccess file. If this works, then rset your custom permalink structure back up again.

  5. HeliR
    Member
    Posted 8 months ago #

    I needed the line DirectoryIndex index.php, this line disappeared in my htaccess without my doing (plugin?)

    # BEGIN WordPress
    DirectoryIndex index.php
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

Topic Closed

This topic has been closed to new replies.

About this Topic