I’ve tried this code in functions.php but it’s not working: https://adambalee.com/search-wordpress-by-custom-fields-without-a-plugin/
No errors, just doesn’t change things.
Using GeneratePress. ACF fields in posts show up blank in results (titles and result excerpts). Is there a way to force them to evaluate earlier?
Thanks
The code you referenced will only cause the search results to include custom fields, it will not cause the values of those fields to appear on the page unless you modify your search result template to output that content.
Oh, right. I also tried this and it didn’t work, maybe it’s also not actually designed to display the fields: https://gist.github.com/charleslouis/5924863