wordpress snippets

Add ACF Data to wp_search

Last modified: November 5, 2018

Sometimes most of the data on your posts or pages is built entirely by ACF. However, when searching your site for words that are used in the ACF fields results in a “no search results” response. There is a simple solution to that.

Add the following to your functions.php file.

Taken from here.

Now if you search your site, your search results will include ACF data.

Save 4 Later
Email these links to yourself