Hiding a widget
Sometimes you may need to disable your widget for a short period of time and removing its installation code from your website can be rather inconvenient as, in this case, you will have to go through the installation process again when you need the widget back.
Fortunately, we have two options that might be helpful for you.
In this article:
Block Domain option
This option can be found in your Elfsight app dashboard in the Statistics tab:
Once the domain is blocked, the widget will no longer be displayed on the site, however, its installation code will still be a part of your website's structure.
Once you decide to enable the widget, you can simply disable this option and the widget will appear on your website again:
However, please keep in mind that our widgets collect views only over 1 month (31 days). Therefore, if you block a domain, the Unblock Domain button will be available within 31 days only. After that, you won't be able to unblock the domain in your personal account. If this happens, please contact us at https://help.elfsight.com/contact and we'll help you unblock your domain.
Commenting out an installation code
Another way to hide a widget would be to comment out its installation code. It looks like this: <!-- your widget's installation code -->
Thus, when you add the widget's installation code to your website, you just need to write
<!-- before the code and --> after the code to hide it.
Here is an example of our commented widget:
This option is suitable when you have several widgets installed on one website but would like to hide only a particular widget.
Why you may need this?
For example, you can use one of these options when the widget on your website gets deactivated. There also can be some other reasons why you may want to disable the widget, however, the widget's deactivation still remains one of the main ones.
As you may already know, Elfsight has its own metric system - views. Once you are over your views limit, the widget on your website gets deactivated either until you upgrade your plan on until the new refreshment date comes.
These two options will help you hide the widget until the new refreshment date. Once the number of views refreshes and the widget reactivates, you can simply bring the widget back.
In case you faced difficulties using our widgets or if you still have any questions that you didn't find the answers for, please contact our Support Team, we will be delighted to help you!