Support

Account

Home Forums General Issues Adding custom fields search to WordPress search Reply To: Adding custom fields search to WordPress search

  • In my case it’s not a custom post type, so that’s simpler. The code in https://adambalee.com/search-wordpress-by-custom-fields-without-a-plugin/ works, but it includes media files in the results (matching image filename or title – I’m not sure). Is there a way to restrict the results to only posts?

    Even though, like ggeiger, I prefer code (cutting with a scalpel instead of a hatchet), I also tried ACF: Better Search. But it did even worse – it not only included media, but failed to even find posts that matched on a custom field I particularly care about, which happens to be structured as a taxonomy. Apparently that’s too hard for the plugin.