// Modify Spectra Image Gallery block to enforce tiled mode during rendering
add_filter(‘render_block’, ‘force_tile_mode_on_render_specific’, 10, 2);
function force_tile_mode_on_render_specific($block_content, $block) {
// Check if the block is a Spectra image gallery block
if (isset($block[‘blockName’]) && $block[‘blockName’] === ‘uagb/image-gallery’) {
// Force the feedLayout attribute to be “tiled”
if (isset($block[‘attrs’]) && isset($block[‘attrs’][‘feedLayout’])) {
$block[‘attrs’][‘feedLayout’] = ’tiled’; // Enforce tiled layout
}
// Ensure that the block has the correct class or ID
if (strpos($block_content, 'uagb-block-7a613e15') !== false || strpos($block_content, 'wp-block-uagb-image-gallery') !== false) {
// Re-render the block with the modified attributes
$block_content = render_block($block);
}
}
return $block_content;
}
]]>I have a question. Can i disable next/prev button on single image popup?
]]>If I swap the order, that one works now that it’s above, but the ones below break leaving a gap after the first image.
I’ve turned off all plugins except Woocommerce and my theme’s child theme.
Does anyone know how to fix this?
]]>It even works with just 1 image in a gallery; it’s a kind of workaround, but it does the trick
Still would be nice if the plugin can work with single images without having to add them to a gallery; is it possible to add this feature?
Cheers,
Marc
Please advise on how to do via GUI, otherwise guess I’m stuck with pasting code.
]]>However, on this particular image, my desired width is 220px, so I changed it in Single image element to show the image with a given resolution 220×43 px. It shows fine but it doesn’t show the retina version.
In the code, it doesn’t use data-srcset but data-src without 1x and 2x URLs.
How can I display retina images on custom-sized single images in WP Bakery builder, please?
Best regards,
Jan
When I try to edit the WooCommerce single product page then the product single image is showing blank/empty. Previously it was showing fine.
Here is the editor page screenshot: https://prnt.sc/scoi9a
Thanks!
]]>Now I can’t get it to work at all! I’m using WP 5.4–en_GB and the problem seems to be there on my sandbox site where I don’t have other graphic plugins. My sense is that it’s a change in how WP calls images that’s broken things. Is that true? Is there a way to get that “click to enlarge” function for a single image with WPf?
]]>I am trying to activate a single image in an Advanced Custom Field (ACF) WYSIWYG Editor. Here’s the progess I’ve made:
<?php if(get_field('faq')): ?>
<?php while(has_sub_field('faq')): ?>
<h3><?php the_sub_field('question');?></h3>
<?php
$content = the_sub_field('answer');
if ( function_exists('slb_activate') )
$content = slb_activate($content);
echo $content;
?>
<?php endwhile; ?>
<?php endif; ?>
What am I doing wrong? Thanks for your help!
]]>