I have a custom blog page in grid style with the thumbnail size set to “Portfolio Small 260×185”.
The Category Archive Pages are also in grid style with the code
add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2);
function avia_change_category_blog_layout($layout, $context){
if($context == 'archive') $layout = 'blog-grid';
return $layout;
}
But the thumbnail size is automatic here. I want it to use the Portfolio Small thumbnails too.
I would be fine automatic for both, if the images would be the same size then…
Hi 4pfelmus,
The only way to redefine the thumbnail sizes is to tweak postslider.php.
In your child theme please do what’s instructed in the documentation: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
Copy postslider.php in the enfold theme (wp-content > themes > enfold > config-templatebuilder > avia-shortcodes > postslider folder) and paste it in the shortcodes folder of your child theme.
Edit postslider.php in the child theme and find these codes (line 596-597 in Enfold 4.7.3):
case '4': $grid = 'av_one_fourth'; if($preview_mode == 'auto') $image_size = 'portfolio_small'; break;
case '5': $grid = 'av_one_fifth'; if($preview_mode == 'auto') $image_size = 'portfolio_small'; break;
Replace portfolio_small with the image size you want to use.
Hope this helps :)
Best regards,
Nikko
Thanks, that fixed it!
Hi 4pfelmus,
We’re glad that we could help :)
Thanks for using Enfold and have a great day!
Best regards,
Nikko