Ecommerce Shopify WordPress Discussion

How to use the enque script function to disable right click on a wordpress site

enter image description here Is there any way I can make this script load first or have my content protection plugins load first? Maybe even excempt certain plugins from being altered by seraphinite accelerator? The enque function is what a lot of places are telling me to use to load a script first but I don't really know how to code or use it. I am using the seraphinite accelerator plugin since it has seemed to speed up the load time of my pages but I think it has changed the way my scripts load to make it faster which is fine but the plugins I used to help with content protection, like disabling right click are now delayed and activate a few seconds late when first loading a page. These plugins used to be active as soon as the page loaded to disable right click. The image I attached is the code I found on youtube that is supposed to disable right click on my website manually. The video told me to put this at the end of the footer.php file between "body" and "html" (For the astra theme). But I still have the delay before right click is stopped by my plugins. When I checked the source of my page, the script I put into the footer loaded at the very end it seems like.
So, if I am right, you need to load a specific script first, if it is a javascript code, then you need to write in the html : <script src="myFirstScript.js"></script> <script src="mySecondScript.js"></script> <script src="myThirdScript.js"></script> and if it is a PHP , then put the PHP code first : echo("My first line executed !") ; echo("My second line executed !") ;

February 17, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.