This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Yoast title field

#34210
Ernest MarcinkoErnest Marcinko
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.