• Resolved manek43509

    (@manek43509)


    I am using Photonic with the PhotoSwipe lightbox. I really like it, but I want to remove the option to download the photo from the ‘Share’ menu (I don’t want people just having my pictures!) on the lightbox. Is there any way to do this?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sayontan

    (@sayontan)

    You would need to edit code for this as currently there is no plugin option to remove the button.

    1. Go to the file wp-content/plugins/photonic/include/scripts/front-end/build/photonic-photoswipe.js, line 853. You will see this:
      shareButtons.push({id:'download', label:'Download image', url:'{{raw_image_url}}', download:true});
    2. Comment out that line (i.e. prefix it with //) or delete it
    3. Save the file

    This should remove the link.

    It is likely to be over a month before I add this as an option to the plugin, so for any interim releases you will need to manually edit the file.

    What about to remove the download link with custom CSS?

    To remove only the download link from the share menu (and keep the other share options):

    .pswp__share-tooltip a:last-child {
        display: none;
    }
    To remove the whole share menu:
    button.pswp__button.pswp__button--share {
        display: none;
    }

    If you add it to the custom CSS from the WordPress customizer, it won’t be overridden when you updates Photonic.

    Peter

    Thank you, that worked perfectly!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove ‘Download’ button’ is closed to new replies.