[resolved] Right click not working on wordpress site-pc, all browsers (3 posts)

  1. srbobc
    Posted 4 years ago #

    Suddenly nothing happens when I right click on my wordpress site. The mouse is working perfectly on any other webpage, but not on my site.

    This means I can't view source code, can't inspect element, etc. Makes it difficult to work on development. It's weird.

    I'm running wp 3.3.2. Genesis pixel madness child theme. I tried disabling all plugins, problem persisted. Tried restarting my machine,..just wishful thinking.

    Check out the site at. hsl.sluggerhost.com/wordpress/

    Any ideas are appreciated.

  2. Harrison Ortega
    Posted 4 years ago #

    You are using the Pixel Happy theme by Studiopress which has a right click disable function. Because it is a photography theme, they thought adding that function would prevent people from copying the photos.

    Open your functions.php and find the following code and comment off everything.

    // Load script for right-click disable
    add_action('get_header', 'pixelhappy_load_scripts');
    function pixelhappy_load_scripts() {
        wp_enqueue_script('rightclick', CHILD_URL.'/js/rightclick.js', array(), '1.1', TRUE);

    so it looks like this: (You can replace the above code with this one)

    // Load script for right-click disable
    //add_action('get_header', 'pixelhappy_load_scripts');
    //function pixelhappy_load_scripts() {
    //wp_enqueue_script('rightclick', CHILD_URL.'/js/rightclick.js', array(), '1.1', TRUE);
  3. srbobc
    Posted 4 years ago #

    That did it - thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Topic