Hi @ssohl,
You mean to set a custom link on a per-image basis? Instead of the defined Link To settings (screenshot)?
Yes setting a custom link for each image, then I could link to my products or another WP page.
Mhmm, that’ll be a bit difficult to achieve, but I’ll look into it and see if I can do some sort of granular control like that for each image.
Thanks for the feedback!
Thanks I think it will be useful for many and a lot of galleries have this function. The only way I could achieve something I wanted was using the Masonry style which allows me to make a caption for each image which can be linked. It would also be cool if it was possible to make a bigger caption than the small font today.
image
-
This reply was modified 5 years, 4 months ago by Søren Sohl.
-
This reply was modified 5 years, 4 months ago by Søren Sohl.
-
This reply was modified 5 years, 4 months ago by Søren Sohl.
I’ll see what I can do @ssohl. Caption sizes are actually defined by the theme (as it’s presentation based) but if you’d like to override it, add this gist of custom CSS via your included child theme or the Additional CSS module Customizer (WP Dashboard > Appearance > Customize).
You can change the pixel size as well.
That should do the trick!
I’ve tried your gist proposal but it didn’t change anything:
.blockgallery--caption {
font-size: 14px;
}
This did work though, but it might not in the future?
li.blocks-gallery-item figure figcaption {
font-size: 20px;
}
-
This reply was modified 5 years, 4 months ago by Søren Sohl.
Just had an idea – I and probably others – would like to create a product gallery.
Wouldn’t it be possible to choose some post id’s like Posts or Products and then it links to this post id’s page?
I’m no developer but this way it would be possible to make a gallery for either pages, posts, products or even categories.
Take a look at https://storefrontblocks.com – he makes some product related blocks but I like yours more.
Hi @ssohl, it’s likely your theme is overriding the caption sizes with pretty specific styling. Your second snippet would continue to work for the foreseeable future of the plugin (as I’m not planning on changing block markup).
I’m working on figuring out a way to add custom links to individual gallery items, which you could then use to link gallery items to specific product pages.
I don’t foresee having the blocks catch pages/posts/categories and pulling their featured image — as then you wouldn’t be able to change those images. The render would be whatever is uploaded to those post types. I don’t particularly like the disassociation between the block and the content/images, as that’s where Gutenberg blocks shine — by merging content and display.
Having a separate product block to pull in WooCommerce products is much more interesting; though it’d likely be a while before I put resources in that direction.
Interesting ideas though!
Individual URL links on the individual images in the gallery is something many users can use and would applaud. I mentioned that to you, Rich, in another message.
Thanks @ludwigkeck, I have something in motion to add that particular functionality. 👍
This is something I need. Can’t use your gallery without it. Any chance you’ve figured it out yet?
@richtabor Hi Rich, I was going to start a new thread about this but I can see you’re working on it. Would be really great to add links to individual images. Hope it’s still coming!
@jdwebsite Yup, it’s coming!
I follow the thread… I’m very interested in individual URL links!!
Thank you