ChristianParticipantFebruary 13, 2020 at 1:54 amPost count: 23
Theme options, Lightbox, –> activate lightbox
Theme options, Lightbox, –> activate Title
Theme options, Woocommerce, Shop –> products = 4
Use Woocommerce Shortcode to make your page with productsdburneyParticipantFebruary 13, 2020 at 2:35 pmPost count: 7
Thanks Clyon for your suggestions. Unfortunately that still creates individual pages for the product. And adds some unnecessary plugin overhead.
The client is a motorsports company that just needs their current inventory viewable as a gallery. We’re not to the point with traffic or budget to build out pages for each motorcycle in inventory. Ideally I bulk upload my images and a gallery is built with just a thumbnail and title that links to lightbox.
Here’s where I am using the Avada Gallery…ChristianParticipantFebruary 14, 2020 at 12:15 amPost count: 23
Ok, you need a store where you show the Vespa category with products that when you click show the lightbox.
What is the link to your website?dburneyParticipantFebruary 14, 2020 at 5:32 pmPost count: 7
Hi Christian – I’m not sure a “store” is necessary. I did find a gallery plugin that I can purchase that will accommodate showing “Title” or “Title/Caption” beneath the thumbnail image. Here’s the demo.
Was hoping I could do something similar to the “Caption” options at the bottom.
I appreciate your help.marklchavesParticipantFebruary 16, 2020 at 3:51 amPost count: 572
I created a custom filter to overwrite the default gallery caption code in
media.php. I overwrite the default image gallery captions with the title</strong. and/or caption from the media attachment meta.
I posted my solution on GitHub.
I welcome any feedback or other non-plugin approaches.
Thanks!dburneyParticipantFebruary 17, 2020 at 8:45 pmPost count: 7
marklchaves – that almost works perfectly for me. I’ve only ran into two drawbacks. The first, which is not too bad – I have to style each gallery individually. The second though is in regards to responsive design. The gallery is not responsive at all and shrinks the columns and thumbnails to fit the screen width instead. Though this may be an issue with WP Gallery in general. I’ve never used it as I’ve always use the Fusion Gallery element. If you have any insights into this, please let me know. I’ll share a link once the site is live.marklchavesParticipantFebruary 19, 2020 at 6:34 amPost count: 572
Cool. Thanks for the follow-up.
Basically, you can specify tags in the shortcode and override the gallery classes.
I updated the Gist with styling options including media queries for mobile and tablet.
I hope that helps!dburneyParticipantFebruary 20, 2020 at 3:24 pmPost count: 7marklchavesParticipantFebruary 23, 2020 at 1:38 amPost count: 572
Excellent. Sorry for the late reply. Ok–there’s one more step unless you beat me to it.
I wasn’t able to override the core
gallery_shortcode()before. I found the issue and fixed it.
I suggest you now move your customisation from the
/wp-includes/media.phpinto your child theme’s
functions.phpfile. We don’t want those changes to be overwritten on the next WordPress upgrade. I hope this makes sense.
I added these steps to my Gist.
Summary of the Process
1. Copy your modified
wp-includes/media.phpto your child theme’s
2. Undo the customisations from the core media.php file. You can see the original code snippet on my Gist if you don’t have it. Or, just leave it alone since you are overriding it anyway. Your call.
3. Rename your copied
4. Add two more lines of code above your custom function to override the core
This must go above your new custom function.
/** * Override the WordPress core media.php gallery_shortcode(). */ remove_shortcode('gallery', 'gallery_shortcode'); add_shortcode( 'gallery', 'my_gallery_shortcode' );
Shout if you have questions!
marklchavesParticipantMarch 8, 2020 at 12:35 pmPost count: 572
- This reply was modified 1 month, 2 weeks ago by marklchaves. Reason: Clarification
I developed a plugin to add the caption filter hook and override the gallery shortcode in
media.php. So, all anyone using the plugin has to do is just write the filter and add it to their child theme’s
The plugin, Gallery Image Captions (GIC), was published yesterday 7 March 2020.
Shout if you have any qestions 😉