By default, AI Search renders results using a built-in card template. You can replace it with your own from your theme's functions.php.
Step 1 — Register your template in the footer:
add_action( 'wp_footer', function () { ?>
<script type="text/html" id="tmpl-my-search-result">
<# console.log(data); #>
<article><a href="{{ data.permalink }}">{{ data.post_title }}</a></article>
</script>
<?php } );
Use {{ data.field }} for escaped output, {{{ data.field }}} for raw HTML, and <# if (condition) { #> for logic.
Add <# console.log(data); #> inside the template to inspect all available fields in your browser console.
Step 2 — Pass the template ID to the shortcode:
[paca_ai_search results_template="my-search-result"]
Available data fields by default: post_title, permalink, post_excerpt, thumbnail_url, categories (array), post_author, post_date, score.
Adding custom fields — Use the paca_ai_search_result_item filter in your functions.php to add any additional data to each result:
add_filter( 'paca_ai_search_result_item', function( $item, $post ) {
$item['reading_time'] = get_post_meta( $post->ID, '_reading_time', true );
return $item;
}, 10, 2 );
The field will then be available in your template as {{ data.reading_time }}.