Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ryan360

    (@ryan360)

    Nevermind, I figured it out. For anyone looking to do this, simply make a folder in your child theme called ‘asl’ (use ‘asp’ if you are using the pro version) and then copy over the file from ajax-search-lite/includes/views/results//includes/views/results/result.php and you can manipulate the output of the search results there.

    This is the full documentation: https://knowledgebase.ajaxsearchpro.com/hooks/templating/result-templating

    • This reply was modified 1 year, 7 months ago by ryan360.
    Plugin Author wpdreams

    (@wpdreams)

    Hi!

    That indeed is a good solution, thank you for sharing.

    If I may recommend, there is a bit simpler way without creating a template file, using this hook:

    add_filter( 'asl_results', 'asl_custom_query_argument_to_results', 10, 1 );
    function asl_custom_query_argument_to_results( $results ) {
    	foreach ($results as $k=>$r) {
    	  	$r->link .= "?my_query_param=value";
    	}
    
    	return $results;
    }

    This code should go 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.

    All the best,
    Ernest

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Appending parameter to URL of search results’ is closed to new replies.