Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Kris

    (@c0nst)

    Hi @joeybol

    If the snippet doesn’t work, it may mean that another element controls the hiding of out-of-stock products in the product archive.

    1. Make sure that module used in the search results page template is called Archive Products. Another module called “Products” is often misused.
    2. Make sure your search results page is excluded from the Shop page template. Sometimes this doesn’t work. You can fix that by:
      Create an empty search.php file in the root of your child theme and paste there the following code:
    <?php
    $frontend    = new \Elementor\Frontend();
    $template_id = 100; // Your search results template ID
    echo $frontend->get_builder_content_for_display( $template_id, $with_css = true );

    To find your search results template ID go to Templates -> Theme Builder -> Products Archive and open the template with the search results. The URL should be like this?https://your-domain.com/wp-admin/post.php?post=100&action=elementor. In this case, the?$template_id?is?100, but in your case, it will be a different number.

    Regards,
    Kris

    Thread Starter joeybol

    (@joeybol)

    Hi @c0nst thanks or your reply. I will test it out. I will come back with an update shortly.

    Thanks again

    Regards,

    Joey

    Thread Starter joeybol

    (@joeybol)

    Thanks for your help @c0nst . It works now! I will mark this thread as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Function Include “out of stock” products in search results” not working’ is closed to new replies.