• Hi

    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: https://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?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator t-p

    (@t-p)

    Try:

    -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.

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

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

    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.
    Before:
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
    After:
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
    Does that help you?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress search not working’ is closed to new replies.