Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Adding shortcode to results › Reply To: Adding shortcode to results
November 18, 2021 at 9:41 am
#35610
Keymaster
Yes, you can.
If you mean the server side (PHP), then you can use the asp_results filter. That is triggered whenever the search is finished and before the output. You can use it as an action hook instead of a filter as well:
add_action( 'asp_results', 'asp_my_custom_results_action', 10, 4 );
function asp_my_custom_results_action( $resultsi, $search_id, $is_ajax, $args) {
// Do your thing here
}
If you mean javascript code executed on the front-end, that is also possible. Check this knowledge base for that.