Hi
W really like the AJAX search feature, which display results according to post type. See screen grab.
Is it possible to search display results on the page in the same way, so users can see which post type a result is from?
Kind regards
Duncan
Hey dweddell,
Thank you for the inquiry.
While this is possible, making these modifications falls outside the scope of our support. You can include the post type in the post meta information. Please insert the following code into the functions.php file.
add_filter('avf_post_metadata_array', function($meta, $context) {
global $post;
if($context == 'loop-search') {
$posttype = get_post_type($post->ID);
$posttypelink = get_post_type_archive_link($posttype);
$meta['post_type'] = "<a href='{$posttypelink}'>$posttype</a>";
}
return $meta;
}, 10, 2);
Best regards,
Ismael
Hi Ismael
Thanks for your help
Kind regards
Duncan
Hi,
Glad Ismael could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike