When you add elements to a product page, this element shows on EVERY product page.
I do not want that so I went in Product Page Code to do something about it.
I followed all the steps showed on this Wix Help Page: Velo Tutorial: Hiding an Element on Certain Pages | Help Center | Wix.com
But when I save and then preview my website, the element that I tried to hide in the code is still there!!
Does someone know what I might have done wrong???
My website: www.siversharkpaddleboards.ca
Code see attachment.
Also, when in Preview mode in the Developer Console it shows this message: Loading the code for the Product Page page. To debug this code, open iky07.js in Developer Tools.
Irene
Get rid of those two red items on line 1 (you should only have // For…) as anything before the // is assumed as part of the page code, hence the red dot by the line number and the red underline too.
As for the code itself, check the understanding the code on the page you linked to as it should be:
$w.onReady(function) () {
// Hides the element when the page loads
$w("#group1").hide();
});
Awesome I did everything you said and now the element is gone!!!
!!! You saved me a day of trying to figure this out. Thanks !
Oh wait, but now that element does not show on ANY of the Product Pages!! I only want to Hide it from certain Product Pages… Is that possible?!
Because the code is typed in “Product Page page code” So I guess there is only 1 “Product Page” that affects every product page. It is not possible to edit the code of 1 single product. This is annoying, because I want to add a Infographic to a FEW products but not to ALL products. That is why I want to hide this element on some Products.
Yes because on your Wix Stores Product Page whatever you do on one page will replicate itself on every product page.
Your store has one product page, but it displays a different version for each product. Customers see the product page when they click on a product.
The Product Page is automatically added when you add Wix Stores to your site.
When you add an element (such as an image, a shape, text, etc.) to your product page, it appears on the product page of every product. This means that if you are in the Editor and add an image of a size chart, for example, to the product page, it will appear on the product page of every shirt, dress, and scarf in a clothing store. To add an image of a size chart for a particular shirt, you would have to add it to that product itself.
if you had seperate pages then you could simply add this hide code to just the selected pages that you wanted to. Or if you wanted to hide it from the whole site, then it would go in the site code instead.
The other way this hide or show could work is if your website contained member only areas where you could use the hide code and incorporate it into your page code so that it only shows member bits once they are logged in.
Unfortunately with your issue, if you hide it from your product page, then you are as you said, removing the element from all of your product pages.
See if you can add whatever you are wanting to add somewhere within the product itself.
@irene-swart Hello Irene.

The simplest way to go about this would be to go to the page where you do no wish this element to appear and select ‘Hidden on Load’
If this causes the item to disappear on all pages, create an onViewportEnter event on the pages you want this element to appear and then add the code as the example below.
export function element _viewportEnter(event) {
//Add your code for this event here:
$w(’ #elementToHide ').show()
}
Note: Replace #elementToHide from the code with the ElementID in question.
Hope this helps. Cheers!
@shinebvarghese
Same as the code Irene is already using, the hidden on load option will work ideally when their is only one page that is needing that option.
However, her trouble is that she is using a Wix Stores Product Page, so whatever she does on the product page will apply to every product page within the store itself.
Any change you make to the product page - such as changing the shape of the Add to Cart button or changing the background color - changes the product page for every product.
Only by adding information to a specific product by accessing the product in the dashboard and customizing it there can it be done to separate products.