Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Display results as default
This topic contains 8 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years ago.
- AuthorPosts
- April 21, 2020 at 11:03 am #26823
Hello,
I would like to know if they’re an option to display all the results as default, I was looking at the configuration but did not find any solution for this, is this possible??
also, how can I change the landing page of the result, I mean when I click on the result I need to be a different page
thanks
April 21, 2020 at 2:34 pm #26828Hi,
The auto populate feature can display results during the page load. I would not recommend displaying all the results at the same time, it may slow down the users browser greatly.
The result links are requested from WordPress, so optimally you should change them there, but you can use custom code if you want to make specific changes to them.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 21, 2020 at 2:56 pm #26831Hello, thanks for your quick answer, it helped me a lot
May 20, 2020 at 11:13 am #27448Hello Again
I was using the custom code to change the results on the search but it change to all the search result in the entire page, Can i do this just for one search ID, example in this page i have 2 search but i just want to change this search result.
At the bottom of the page
http://kiva.weareinhouse.com/leadership-and-team/thanks
wallyMay 20, 2020 at 12:59 pm #27454Hi,
Sure, it depends on your custom code. Can you please copy/pase it here? I will take a look.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 20, 2020 at 2:30 pm #27463I was using this,but it change all the result pages of the search in the site, as i have 2 different ones then it change for 2 but i need that this change apply in a just one search
add_filter( ‘asp_results’, ‘asp_custom_link_results’, 1, 1 );
function asp_custom_link_results( $results ) {
// Parse through each result item
foreach ($results as $k=>$v) {
/**
* In this context the
* $results[$k]->link
* variable holds the result link. Make modifications to that variable.
*/
$results[$k]->link = ‘#’;
}return $results;
}May 20, 2020 at 2:54 pm #27464Hi,
In that case, this variation will pass the search ID as an argument, so you can check that in the code:
Best,add_filter( 'asp_results', 'asp_custom_link_results', 10, 2 ); function asp_custom_link_results( $results, $search_id ) { if ( $search_id == 1 ) { foreach ($results as $k=> &$r) { $r->link = '#'; } } return $results; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 20, 2020 at 6:52 pm #27470great!! this worked,
thanks!!May 21, 2020 at 12:59 pm #27485You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.