Search Filters

From Habari Project

Jump to: navigation, search

The manage pages provide a search box which accepts two kinds of content. The first kind is standard text search, where returned results have a title or content containing all of the search terms. The second kind is a keyword based search, similar to Google's advanced search operators. With these keywords you can select posts based on author, status, type, and tag. All of these keywords are used with a syntax like: keyword:value.

Available Keywords

author
Searches based on post or comment author
status
Searches based on post or comment status. On the posts manage page, allowed status types are: published, draft, and scheduled. On the comments manage page, allowed status types are: approved, unapproved, and spam
type
Only available on the posts manage pages. Searches based on post type. Post types include entry and page, but also any content types registered by plugins (e.g. podcast).
tag
Only available on the posts manage pages. Searches based on post keyword.

When a given keyword is used more than once, an implicit OR is specified. This is in contrast to non-keyword search terms where there is an implicit AND.

Examples

To search for published pages containing the word "habari" you would enter: "status:published type:page habari".

If I want to find my draft entries tagged with both "random" and "funny" you would enter: "status:draft type:entry tag:random tag:funny".

Developer Note

The conversion of a search string into a call to Posts::get() or Comments::get() happens in the Posts::search_to_get() and Comments::search_to_get() functions.

Personal tools