All Collections
How to Hide a Widget on Specific Product and Collection pages
How to Hide a Widget on Specific Product and Collection pages

This guide will walk you through how to hide a Rebuy Widget on specific Product and Collection pages.

Keri Medeiros avatar
Written by Keri Medeiros
Updated over a week ago

There may be situations where you want to prevent a Rebuy Widget from being shown on a specific Product page or Collection page. You can easily hide the Widget by setting up a custom rule in the Widget's Data Source by following the steps below.

Please note this workflow only applies to Product Page (PDP) Widgets. More information on applicable Product Page Widget types can be found below:

Step 1: Navigate to the Widget's Data Source settings

Navigate to the Data Source associated to the Widget you are looking to hide from select pages on your site. You can do this by clicking on "Data Source" from within in the Widget's settings:

Step 2: Create a custom Data Source rule for the exclusion

Within the Widget's Data Source, create a rule with an IF statement that contains the specific Product page product(s) you are looking to exclude the widget from and set it to RETURN "No Products". Be sure to utilize the search field to search for and input the specific products to exclude the widget from, and use "Contains Any":

To hide a widget on a Collection page, you can follow a similar rule workflow. For example, you can create a rule with IF and RETURN statements as follows:

NOTE: The example rule above should always be the first rule (Rule #1). If you wish to hide a widget on both Product AND Collection pages, you can combine them into one rule using an "OR" statement.

Step 3: Enable "Exit if Matched" for your new exclusion rule

Next, toggle on the "Exit if Matched" setting for this exclusion rule to ensure the Data Source does not continue to evaluate and return other rules in the rule set if and when the Rule 1 criteria is met.

Step 4: Test on your live site

Navigate to the specific Product page or Collection page on your live site to verify whether the widget is no longer showing.

Note: The widget will remain installed on the page, but will not be displayed.

If you have more questions, please reach out to support!

Did this answer your question?