HACK: Search plugin: custom fields in search results

Post Reply
Ssr. Bludit
Posts: 12
Joined: Sat Dec 15, 2018 11:37 pm


Found a solution how can searching also custom fields.
Adding this code in ../search/plugin.php (below line 209):

Code: Select all

$cache[$pageKey]['CUSTOM-FIELD'] = $page->custom('CUSTOM-FIELD');
Replace CUSTOM-FIELD with the name from your custom-field, (only useful for string-type custom fields).
search-custom-field.png (111.57 KiB) Viewed 577 times
Post Reply