[wp-trac] [WordPress Trac] #21009: If name="post_type" is set in search template the archive template is loaded.

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 18 12:46:52 UTC 2012


#21009: If name="post_type" is set in search template the archive template is
loaded.
--------------------------+-----------------------------
 Reporter:  ZaneMatthew   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Post Types    |    Version:  3.4
 Severity:  minor         |   Keywords:
--------------------------+-----------------------------
 I have a hidden form field named "post_type", which is used in the search
 form. When the user searches the archive.php template is loaded and not
 the search.php template.

 I'm not sure if this is a bug, or unexpected behavior, note my fix was to
 use a different form field name.

 Bug(?) url:
 == http://bmxraceevents.com/?s=maryland&post_type=events ==

 Fixed url:
 == http://bmxraceevents.com/?s=maryland&type=events ==

 == http://zanematthew.com/blog/2012/06/unexpected-behavior-in-wordpress-
 custom-post-type-search-template/ ==

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21009>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list