Home/ Documentation/ WordPress/ Blocks/ Adding Front-end JavaScript Code

Adding Front-end JavaScript Code

Our block might require some JavaScript code when displayed on the front end (on the website, not in the block editor). To add a front-end script to the block, include the .js file with the Script setting on the Block action. Note that for ACF blocks, the script will also be included in the block

Our block might require some JavaScript code when displayed on the front end (on the website, not in the block editor).

To add a front-end script to the block, include the .js file with the Script setting on the Block action.

Note that for ACF blocks, the script will also be included in the block editor.



Last updated on October 29, 2021 at 5:29 am


Print this article