Most often I come across the same problem.

When users search the pages, they have a problem!

The problem

How to search custom fields as well as content and title etc on wordpress and display them.

The solution

It’s really simple, go to search.php on your theme folder, and add the following right at the top of the page, of course inside a php open tag.

The code below works well with “Advanced custom fields” but it should work on normal custom fields too.

That is it…

Hope you like the quick fix, no changes are required, unless of course you need to work a little better or you are face with a slight problem.

Leave a comment if this is not helpful with your problem and we can try and help resolve it.