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

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

wordpress search not working

Hi

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>
            </form>

after searching for 'fan' the url looks correct

/index.php/search/?s=fan

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

Where am I going wrong?

0
cycledude
Asked:
cycledude
  • 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...
0
 
cycledudeAuthor Commented:
and my body tag has a class error404

0
 
cycledudeAuthor Commented:
changed my form declaration to

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

and it works.... go figure!

0
 
cycledudeAuthor Commented:
\o/ yay another one down!
0

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