JS Exclusion | WordPress.org

[ad_1]

Hi @danishhaidri,

If you are adding the code as code type JavaScript in WPCode you will have to use a filter to add that parameter but you can do that using a WPCode PHP Snippet really easily, here’s the code https://library.wpcode.com/snippet/7oq8nkow/

You can click the “Use Snippet” button on that page to deploy the snippet to your site.

If you are adding JS code as HTML snippets you can simply edit the <script> tag to include the data-no-optimize="1" parameter like this: <scriptdata-no-optimize="1"> 

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer