I would like to have ACF field values to be added to the search result.
I understand that you can not do a lot of customization, so i was searching for myself and i have got this:
https://gist.github.com/charleslouis/5924863
and i was adding this to functions.php, but it is not working for me.
Maybe you can help me to get this working. (Newspaper V 6.6.2)
This might or might not help
http://adambalee.com/search-wordpress-by-custom-fields-without-a-plugin/
thank you so much!
its working!
but there one part, where its not showing:
the ajax search in the menu bar
maybe you can help me with this…
i guess you have to change something here
wp-content\themes\Newspaper\includes\wp_booster\td_data_source.php
in the block:
static function &get_wp_query_search($search_string) {
$args = array(
‘s’ => $search_string,
‘post_type’ => array(‘post’),
‘posts_per_page’ => 4,
‘post_status’ => ‘publish’
);
$td_query = new WP_Query($args);
return $td_query;
}
Hello,
Unfortunately we cannot provide a quick solution for this. The ajax search was designed to work with posts not custom fields. Even if you manage to get it to work with custom post types, ta custom field is not a post type. All of the code has to be changed.
As you can see here: http://screencast.com/t/nOdiP3Bc the result will grab posts, not fields.
You can find the function here:
http://screencast.com/t/StjxCgsUf
You will have to get some hired help on this one as it won’t be so easy like simply copying a piece of code or replacing another piece. This will require the code to be adaptated to the fields code.
You can hire a freelancer form sites like studio.envato.com if you truly need this customization.
Thank you for your understanding.