Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

wordpress search not working


Just trying to implements a simple search on my wordpress site....

I have static pages (initial page is set to static) with a blog section.

I created a template and called it search

template name: Search

from within wordpress i created a page called search

my search form is:

      <form id='search' method='get' action='../search/' >
                  <input type='text' id="s" name='s' value='<?php the_search_query(); ?>' />
                  <input class="rounded-right" type='submit' value='Search' />
                  <div style='clear:both'></div>

after searching for 'fan' the url looks correct


but the page showing is my blog page with no content (the search page has a heading 'Search Results" )

Where am I going wrong?

  • 4
1 Solution
cycledudeAuthor Commented:
a little more information:

if I go directly to index.php/seach

i get my search page with no results...
cycledudeAuthor Commented:
and my body tag has a class error404

cycledudeAuthor Commented:
changed my form declaration to

      <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">

and it works.... go figure!

cycledudeAuthor Commented:
\o/ yay another one down!

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now