• Hello,
    congratulations for your plugin! Really very simple and functional!
    Is there a way to disable the navigation keys, to switch from one image to another? I would just like to make the image appear full screen with the possibility of zooming.
    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    You can create a custom CSS rule to hide the navigation buttons:

    
    .pswp__button--arrow--left,
    .pswp__button--arrow--right {
      display: none;
    }
    

    If you also want to hide the top navigation bar:

    
    .pswp__button--arrow--left,
    .pswp__button--arrow--right,
    .pswp__top-bar {
      display: none;
    }
    
    Thread Starter leoidro

    (@leoidro)

    Thank you for your answer.
    Where I need to add this CSS code?
    Thanks

    Plugin Author Arno Welzel

    (@awelzel)

    You can add the code in the styles.css of your theme or as as “Custom CSS” in the theme customizer.

    Thread Starter leoidro

    (@leoidro)

    Thanks for your help. It worked

    Thread Starter leoidro

    (@leoidro)

    I’m sorry to be so insistent, but with the keyboard keys you can still browse through the images. Is there a way to disable this behavior? Thanks a lot

    Plugin Author Arno Welzel

    (@awelzel)

    Using the keyboard is a feature of PhotoSwipe. Disabling this would require to change the code of PhotoSwipe itself. There are other shortcuts as well:

    F – Toggle between normal view and full screen
    Esc – Close the lightbox

    Why do you want to disable the keyboard shortcuts? If there are no arrows and no keyboard shortcuts, you can still drag the pictures using the mouse or with a slide gesture in mobile view.

    And no – disabling the whole picture change is not possible. This is a basic function of PhotoSwipe which can not be disabled.

    • This reply was modified 5 years, 1 month ago by Arno Welzel.
    • This reply was modified 5 years, 1 month ago by Arno Welzel.
    • This reply was modified 5 years, 1 month ago by Arno Welzel.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Disable navigation buttons’ is closed to new replies.