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

Reply To: Distance Filters

#28052
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

Well, I’m afraid the thing with the settings is not possible – that needs to be custom coded somehow. There is a javascript API, that may help, if you decide to try it, or if a developer may need it.

The other one with the logged in users is also a custom coding issue, but should be simpler. Based on this knowledge base, I would try something like this:

add_filter( 'asp_results', 'asp_custom_link_results', 10, 1 );
function asp_custom_link_results( $results ) {
	$link = 'https://www.google.com/';	// Link to use, when not logged in
	
	// Parse through each result item
	foreach ($results as $k=>$v) {
	  if ( !is_user_logged_in() )
		$results[$k]->link  = $link;
	}

	return $results;
}