Reference

Search

OForumorravo.com/docs/oforum/search

Full-text search is available at every level (forum index, room, thread page).

PHP API

php$result = OF_Search::search('doctrine of grace', [
    'room_id'     => 5,
    'thread_type' => 'discussion',
    'author_id'   => 0,
    'date_from'   => '2025-01-01',
    'date_to'     => '2025-12-31',
    'page'        => 1,
    'per_page'    => 20,
]);

// Returns:
// [
//   'results'   => [['id', 'title', 'excerpt', 'url', 'date', 'author', 'type'], ...],
//   'total'     => 42,
//   'max_pages' => 3,
// ]

Search results include <mark> tags around matching terms for keyword highlighting.

REST API

GET /wp-json/oforum/v1/search?q=keyword&room_id=5&page=1

Frontend live search

The forum index and room pages include a live search box (#of-search-input) that calls the REST API after 300ms debounce and renders results in #of-search-results.


Search — OForum Docs — Orravo