Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › URL’s not working correctly with Divi FAQ › Reply To: URL’s not working correctly with Divi FAQ
September 19, 2025 at 7:55 am
#55507
Keymaster
Oh, that is a big shame. That basically means these URLs does not exist(?) and can’t be requested, probably generated on the frontend.
Still, there might be a hope to brute force it via converting the title to a hash, but I’m not sure:
add_filter(
'asp_results',
function ( $results, $id, $is_ajax, $args ) {
if ( $id != 6 ) {
return $results;
}
$to_hash = function ( $str ) {
$str = preg_replace('/\s+/', '-', strtolower($str));
return preg_replace('/[^A-Za-z0-9\-]/', '', $str);
};
// -- Do not change anything below --
foreach ( $results as $k => $r ) {
$r->link = 'https://www.nevadainsuranceenrollment.com/questions-faq/health-insurance-faq/#' . $to_hash($r->title);
}
return $results;
},
10,
4
);
Try adding this code via the Code Snippets plugin or 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.