WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 8 years ago

#1230 closed enhancement (wontfix)

searchable custom fields

Reported by: yourcelf Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5.1
Component: General Keywords:
Focuses: Cc:

Description

WordPress allows one to "search" by many types of meta information surrounding a post. For example, one may limit one's results by author ("index.php?author_name=alice"), by search terms ("index.php?s=foo+words"), or by date ("index.php?minute=5").

It would be very useful to also be able to limit results by "custom fields" (you know, the ones stored in wp_postmeta), by either key or value. For example: "index.php?custom_key=myfield&custom_val=5"
would show all posts that both have the custom key "myfield" stored, and have a value of 5 for that key.

Attachments (1)

custom_fields_patch.txt (3.9 KB) - added by yourcelf 10 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 @yourcelf10 years ago

  • Patch set to No

comment:2 @yourcelf10 years ago

The patch there implements this feature.

comment:3 @johnbillion8 years ago

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

Due to the fact that custom fields can be used for an unlimited number of applications, and many custom fields can be affixed to a post, it wouldn't make sense for custom fields to be searchable by default in WordPress. This is best left to plugins which require such functionality.

Closing as wontfix unless anyone has an argument for this should be in the core.

Note: See TracTickets for help on using tickets.