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

    (@mihail-barinov)

    Hello,

    Well yes, it is possible. But without “&post_type=product” you will see default WordPress search results, not the WooCommerce products results.
    I think that the problem is that you don’t have the template for product search results. Please read this article to learn how to create such template via Elementor.

    Anyway if you still want to remove ‘post_type=product’ from the URL you can use following code snippet:

    add_filter( 'aws_searchbox_markup', 'my_aws_searchbox_markup' );
    function my_aws_searchbox_markup( $markup ) {
        $hidden = '<input type="hidden" name="post_type" value="product">';
        $markup = str_replace( $hidden, '', $markup );
        return $markup;
    }

    You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.

    Regards

    Thread Starter prokops

    (@prokops)

    It did not work for me. At least I figured out why it is messed up, it is the theme “Xstore” that controls sidebars and search result regardless of Elementor settings.

    Plugin Author ILLID

    (@mihail-barinov)

    You are talking about code snippet or template for search results?

    Thread Starter prokops

    (@prokops)

    The snippet did not work, but I am sure it is some Xstore theme fuckery. I solved this problem by letting the theme decide sidebar layout.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘AWS search widget results’ is closed to new replies.