Support » Plugin: Portfolio Slideshow » [Plugin: Portfolio Slideshow] TUTORIAL | Add Arrow-Key Navigation

  • Resolved jaredsmyth


    I just wanted to post a quick ‘tutorial’ for anyone who is interested in adding arrow-key navigation to this plugin. The Pro version from RayGun already has that functionality, but the free version was lacking it. I checked with Dalton at RayGun and he gave me the OK to post this as a tutorial but said that RayGun has no plans of adding it standard to the free version.

    So, if you’re interested in hacking this plugin to include arrow-key navigation the instructions follow.

    *do not attempt this if you think you ‘might break it.’ this is not a hard modification to do by any means, but i take no responsibility if you ‘break your site.’


    To enable Arrow-Key navigation in Portfolio Slideshow:

    1) Navigate to: Plugins -> Editor -> Portfolio Slideshow

    2) Open portfolio-slideshow/inc/shortcode.php

    3) Scroll to the bottom of the document, and just above the line that reads
    return $slideshow;
    add this code:

    echo ' <script type=\'text/javascript\'>
    	$(window).keydown (function (e) {
        		if ( e.which === 39 )
        		if ( e.which === 37 )
    </script> ';

    4) Enjoy flipping through the images in your galleries with the arrow keys on your keyboard.


Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Portfolio Slideshow] TUTORIAL | Add Arrow-Key Navigation’ is closed to new replies.