Skip to content

Instantly share code, notes, and snippets.

Boldairdev / custom-search-acf-wordpress.php
Last active July 19, 2019 16:05 — forked from charleslouis/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* each array member is the name (slug) of the key we want to search
* @return [array] [list of custom fields]
function list_searcheable_acf(){
$list_searcheable_acf = array("productean", "productidentart", "productnumart", "productauthors", "_sku");
return $list_searcheable_acf;