Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#9908 closed defect (bug) (fixed)

get_search_form can only be used once

Reported by: mtdewvirus's profile mtdewvirus Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.8
Component: Themes Keywords:
Focuses: Cc:

Description

get_search_form only works once on any given page view. It uses locate_template with the load option set to true. This calls load_template, which uses require_once to load the template file. Any more attempts to display the search form on a page will fail.

Many themes will display the search form in the header area. If this is the case, the function doesn't work for Search widgets or if a search form is displayed on an error page.

Attachments (1)

multiple-search-forms.diff (668 bytes) - added by mtdewvirus 16 years ago.

Download all attachments as: .zip

Change History (2)

#1 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11430]) Allow multiple search form templates. Props mtdewvirus. fixes #9908

Note: See TracTickets for help on using tickets.