1. Home
  2. Frequently Asked Questions
  3. Disable Right Clicking on Your Website

Disable Right Clicking on Your Website

To add an extra layer of security to your website you can add this code to disable right clicking on your website to make it a little harder to view the source code.


In the steps below you will add code to a widget that appears on every page of your website.

Follow these steps.

1. In WordPress click Widgets under Appearance on the sidebar.

Screen Shot 2014-04-29 at 7.15.50 PM

2. If you are using footer widgets, copy and paste the code below into one of the Text widgets at the bottom of what ever code you have in a text widget, and click the save button.

<script type="text/javascript">
$(document).ready(function(){  $(document).bind("contextmenu",function(e){ return false; }); });

Example image:

Screen Shot 2014-04-29 at 7.21.35 PM

If you aren’t using footer widgets. Paste the code above into a text widget under your other code on both the Single Beats Sidebar and the Beat Store & Genre Sidebar sidebar options.

Updated on November 9, 2017

Was this article helpful?

Related Articles

Leave a Comment