wordpress search not working

Posted on 2011-10-21
Last Modified: 2012-05-12

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?

Question by:cycledude

    Author Comment

    a little more information:

    if I go directly to index.php/seach

    i get my search page with no results...

    Author Comment

    and my body tag has a class error404


    Accepted Solution

    changed my form declaration to

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

    and it works.... go figure!


    Author Closing Comment

    \o/ yay another one down!

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Remove font-weight from footer text 4 29
    wordpress ODBC Access 3 55
    Connect Page to Menu 1 23
    element on site jumps 4 26
    Did you use a default hosting installation of wordpress with the intention of it being your actual site?  Maybe you’ve installed it as a Blog to your current site and recently converted it to be the main site and do away with the old .htm pages.  An…
    In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
    The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: :…
    The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be Log into your Hosting account. IPage will be used for demonstration : Locat…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now