-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I add links to images within a gallery so the image is clickable? #8929
Comments
Hi @Clemsou! Thank you for your question. There is not currently a way to add links to images within a gallery, and there is a long-standing request for that in the core WordPress project at https://core.trac.wordpress.org/ticket/13429 I am going to close this issue a duplicate since there is already a feature request open for it. If you would like to add your voice to the exiting feature request, please add your vote and optionally post a little bit of detail about why you are trying to add links to gallery images and why it is important to you at https://wordpress.org/ideas/topic/custom-links-on-images-within-a-gallery If you have future questions about how Gutenberg works, can you please post at https://wordpress.org/support/plugin/gutenberg to ask there first? It will help us to keep this area streamlined and support forums are the recommended first place to ask for help with how to use the editor or if a feature has already been requested or not. Thank you so much and thanks for testing Gutenberg and asking questions! |
@joostmollerus you could do it by adding the images to a table or a columns block. If you need help or have questions about implementing something like that, please ask for help in the forums at https://wordpress.org/support/forum/how-to-and-troubleshooting/. |
Although tedious, but simple (even for a non-developer), if you insert a gallery block and add gallery images and then set number of columns for block and set link to: "Attachments", you can then go to the block and "edit in html" and just replace the href=urls on each image with the link you want plus _target="blank" if you want to open in new tab, etc. For a small gallery, it is not too bad but they do need to fix this. |
I've had success wrapping the gallery's |
I found a plugin that will do this: https://wordpress.org/plugins/gallery-custom-links/ and I also discovered I had another premium plugin I was already using that does this. WP Media Folders which is an awesome plugin to create folders in the media library and you can delete the plugin and everything goes back to normal. https://www.joomunited.com/wordpress-products/wp-media-folder One thing to keep in mind when assigning a link to the image is that anywhere you use that image it will contain the link which may be the behavior you want or maybe not. If not just create a second image with a different name. |
sasserc - this worked great - thank you! |
The wordpress team seems to be working on a solution right now #25940 For a temporary workaround you can use @sasserc 's method above or one of the jQuery and CSS solutions mentioned here |
I'm trying to add links to images within a gallery so the image is clickable and links to an internal page or an external site. I found how to add a link on each image but it appear written on the images when I want it hidden so it looks more aesthetic. Is there a way to do this?
The text was updated successfully, but these errors were encountered: