Know where to put your code so it does what you need

There are better places you can place code in Wix Code and it’s vital to know the distinction so you put the right code perfectly located.

For this tip, we will zero in on code that runs in your guest’s program. There are three spots where you can add code to run the program:

The Page tab of the Code Board

The Site tab of the Code Board

The Public part of the Site Design sidebar

We should take them each in turn.

Page tab - This is where you put code that mainly influences the page it’s on. You’ll involve this code tab that controls the components that show up just on one page.

Site tab - This is where you put code that sudden spikes in demand for each page on your site. You’ll involve this code tab that controls components that are set to show up on all pages.

Public area - This is where you put JavaScript records that contain code you need to involve on any page on your site. You can likewise involve code from one Public record in another.