Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Yoast title field › Reply To: Yoast title field
August 6, 2021 at 3:11 pm
#34210
Keymaster
Well, I am not sure then, but maybe via a custom code.
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_filter( 'asp_results', 'asp_force_yoast_title', 10, 1 );
function asp_force_yoast_title( $results ) {
foreach ($results as $k => &$r ) {
$r->title = apply_filters('the_title', $r->id);
}
return $results;
}
If all goes well, this should force the title hook again on the final search results, resolving the yoast syntax.