Support » Fixing WordPress » Link to media is not working for gallery images on mobile devices

  • Jack


    I just noticed that links to media is not working for gallery images on mobile devices. I have done the same thing as always and it is working for single images on a page, but not for images inside a gallery.

    For instance this page:

    • This topic was modified 1 month ago by  Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • DesignSmoke


    Here’s a (slightly working) fix. Add this wherever you can add CSS.

    @media only screen and (max-width: 720px) {
    	li.blocks-gallery-item figure figcaption {
    		padding: 0 !important;

    The figcaption element is overlayed on top of the image. However, when it’s clicked, the lightbox will not show – this is a problem with the plugin or theme and will need to be fixed by that author. The reason why it doesn’t work at all on mobile is due to the size of the padding on the image title – it completely covers the image. By reducing the extra padding, the image becomes mostly usable on mobile.

    Hi @moxie!

    Unfortunately this is a known bug caused by the gallery captions covering the clickable area:

    As a temporary workaround, you could add some custom CSS:

    .blocks-gallery-item figcaption {
    	pointer-events: none;


    Thanks to you both. When I read your replies I tried again and noticed that there is a very small area at the top of the image that is still clickable. With you suggestions I can solve the problem until there is a fix.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.