How to Disable Right Click Without using a Plugin.
To disable right-click in Wordpress, you have to use a small Javascript code in the footer section.
Just go to WordPress dashboard > appearance> edit theme and find the footer.php file.
Now find the tag in the footer.php file and paste the code just above it.
Now save the code and the copy-paste functionality is blocked in your Wordpress website.
Here, you can exclude certain areas like code boxes, quote boxes where users can still copy
content. just add the code just below the first code.
.post blockquote,.wp-block-code code {
-webkit-user-select: text !important;
-moz-user-select: text !important;
-ms-user-select: text !important;
user-select: text !important;
}
Advocate PriyankaWelcome to State Pariksha! Your one-stop destination for all State and Competitive Exam preparation. Get the latest updates, exam notifications, practice quizzes, GK notes, current affairs, and study material – all in one place to help you succeed in your next government job exam.
कोई टिप्पणी नहीं
एक टिप्पणी भेजें