Slider
Hi,
I'm using the [slider] shortcode to display product images on a custom post type template built with BeBuilder.
Shortcode used:
[slider category="wall-packs-lkfs" orderby="date" order="DESC" style="" navigation=""]
ISSUE
The slider outputs the "slider-content" image size (registered as 1630x860, hard crop). My source images are square (1024x1024), so the hard crop cuts roughly 16% of the image height — the product renders appear cropped top and bottom.
I confirmed this with wp_get_registered_image_subsizes():
[slider-content] => Array
(
[width] => 1630
[height] => 860
[crop] => 1
)
I could not find any setting for this size in Theme Options, in the Slides post type, or in WordPress Media Settings.
QUESTIONS
1. Does the [slider] shortcode accept an attribute to specify a different image size? The documentation lists only category, orderby, order, style and navigation.
2. If not, is there a supported filter or hook to change which image size the slider consumes?
3. Is "slider-content" used anywhere else in the theme besides the Slides slider? I want to know the impact before re-registering it with crop = false from my child theme.
ENVIRONMENT
BeTheme 28.5.3 (child theme active)
WordPress 7.0.2
Thanks.
Comments
Hi,
1) No, there is no such feature for the slider.
2) If you would like to do it by editing the files, you would have to overwrite the entire function with the image sizes in your child theme. Anyway, as a workaround, you can do the following: go to Betheme -> Theme options -> Performance, and uncheck Slider image sizes.
Then go to Betheme -> Tools, and use the Regenerate Thumbnails option. Thanks to that, sliders will use images with the exact same size as you uploaded them.
3) It is used only for the slider element.
Best regards