• Resolved six7zero9

    (@six7zero9)


    I am trying to unload an elementor widget from no results search page with the url:
    https://my-site/?s=asdfasdf&post_type=product

    I am using the following regex which I found in the docs:
    #^/\?#

    The results page still displays:
    [product_categories slug='snacks']

    After inspecting I still see this:
    <p class="elementor-widget-wc-categories"> [product_categories slug='snacks']</p>

    I am not really sure if this is something I am doing wrong with asset clean up or maybe a wordpress thing. Any help or suggestions would be greatly appreciated.

    • This topic was modified 4 years, 1 month ago by six7zero9.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @six7zero9 when you’re saying “I am trying to unload an Elementor widget“, are you referring to a certain plugin that is linked to Elementor or CSS/JS files. If it’s the latter, then that shortcode will still show up. You might be able to strip it completely (the shortcode including the P tag) if you unload the whole plugin. That’s if the plugin is printing that shortcode. If you have the shortcode inside a theme file, then you need to do some custom coding to strip it out, but that’s not common.

    Your RegEx matches for any URI that starts with /? so you have to be careful in case other URIs that are accessed (any of them), contain extra parameters such as /?fbclid=[value_here] or /?utm_source=[value_here]. You might want to add s= before the closing #.

    Thread Starter six7zero9

    (@six7zero9)

    So I changed the regex to #^/\?s=#, but am still seeing the shortcode.

    inspecting shows:

    <p class="woocommerce-info">No products were found matching your selection.</p>
    ::before
    No products were found matching your selection.
    ::after
    </p>
    <p class="elementor-widget-wc-categories"> [product_categories slug='snacks']</p>

    This is starting to feel like I should be asking the theme developers if they have any suggestions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to Unload Elementor from Search Results’ is closed to new replies.