Display results as default

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 Ernest Marcinko 3 years, 11 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #26823
    wallytor72
    wallytor72
    Participant

    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

    #26828
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #26831
    wallytor72
    wallytor72
    Participant

    Hello, thanks for your quick answer, it helped me a lot

    #27448
    wallytor72
    wallytor72
    Participant

    Hello 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
    wally

    #27454
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #27463
    wallytor72
    wallytor72
    Participant

    I 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;
    }

    #27464
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    In that case, this variation will pass the search ID as an argument, so you can check that in the code:

    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;
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27470
    wallytor72
    wallytor72
    Participant

    great!! this worked,
    thanks!!

    #27485
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.