WordPress search not working (5 posts)

  1. s0206
    Posted 5 years ago #


    I am having some problems with the search on my wordpress site. i am using a custom template that I developed myself. I am new to wordpress and I can't seem to get the search to work properly.

    I notice when I run a search there is no query in the url. For example on other blogs I notice after a search is submitted the url changes to something like the following: http://wordpress.site.com/?s=fdsfsd

    But for some reason my site does not. When there is more than one page of results, clicking the next page redirects to the homepage!

    I'm not sure what I am missing here.

    Any advice?


  2. Tara
    Volunteer Moderator
    Posted 5 years ago #


    -deactivating ALL plugins temporarily to narrow down and possibly fix the problem. If the problem goes away, activate them individually to find the culprit.

    -switching to the default theme ("twentyten") for a moment by renaming your current theme's folder in wp-content/themes. The idea is to force WordPress to fall back to the default theme to rule out any theme-specific issue.

  3. mewing22
    Posted 5 years ago #

    I'm having the same problem. Please let me know if you find the solution.

  4. mewing22
    Posted 5 years ago #

    Every free theme at http://designdisease.com has the same problem. Try searching for the word "the" in any of them: http://designdisease.com/preview/ So, the problem is most likely not our plugins.

  5. mewing22
    Posted 5 years ago #

    I discovered that the problem was in my theme's searchform.php file. I changed the form method from "post" to "get." Now search queries show up in the url address.
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
    Does that help you?

Topic Closed

This topic has been closed to new replies.

About this Topic