• Resolved lodestonedynamo

    (@lodestonedynamo)


    You were kind enough to provide some code for us to add the results from our knowledge base into the search results. It’s working great but we are wondering about moving it below the product search results. RIght now it shows up on the top of the list if there are any knowledge base results. We did purchase the pro version and are loving it so far. Thank you!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    Yes, it is possible. Please use following code snippet

    add_action( 'wp_enqueue_scripts', 'aws_wp_enqueue_scripts', 999 );
    function aws_wp_enqueue_scripts() {
    
        $script = '
            function aws_results_html( html, options ) {
                html = html.replace(/(<a.*aws_result_item aws_result_tax[.\s\S]*?<\/a>)(<a.*class="aws_result_item"[.\s\S]*?<\/a>)/gm, "$2$1");
                return html;
            }
            AwsHooks.add_filter( "aws_results_html", aws_results_html );
        ';
    
        wp_add_inline_script( 'aws-script', $script);
        wp_add_inline_script( 'aws-pro-script', $script);
    
    }
    Thread Starter lodestonedynamo

    (@lodestonedynamo)

    Thank you so much. I appreciate the great support. This worked great.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Switching Order of Results Display’ is closed to new replies.