-
AuthorPosts
-
March 11, 2024 at 2:13 pm #1436955
I have set the grid layout in the blog layout. How can I change the size of the image to the format “Entry with sidebar”?
March 12, 2024 at 9:53 am #1437026so you are not using the alb element “blog posts” to show the content – but you have declared a page on : Enfold Child – Theme Options : “Where Do You Want To Display The Blog”. – and on Enfold Child – Blog Layout – you set the blog Layout to “Grid Layout”
try in your child-theme functions.php:
add_filter("avf_post_slider_args", function($atts, $context) { if( $context == "index" ) { $atts['type'] = 'grid'; $atts['columns'] = 3; $atts['preview_mode'] = 'custom'; $atts['image_size'] = 'entry_with_sidebar'; } return $atts; }, 10, 2);
other contexts in this could be : archive or tag – you can change the columns here too
March 12, 2024 at 5:50 pm #1437073I don’t quite understand what you mean by alb element.
I don’t have a defined page for the layout.
I have set this layout:
Enfold Child > Blog Layout > Grid Layout
but in the archive.php I have now found the customization I had to make to display it correctly.$atts = array( 'type' => 'grid', 'items' => get_option( 'posts_per_page' ), 'columns' => 2, 'class' => 'avia-builder-el-no-sibling', 'paginate' => 'yes', 'preview_mode' => 'entry_with_sidebar', 'image_size' => 'entry_with_sidebar', 'use_main_query_pagination' => 'yes', 'custom_query' => array( 'post__in' => $post_ids, 'post_type' => get_post_types() ) );
Thanks for the help
March 12, 2024 at 5:56 pm #1437074can you please test that snippet!
if you like to have 4 columns – just change it.if you like to show the blog – then the context is not archive – it is index then ;)
PS: alb element = advanced layout builder element : if you use that – the element itself got some options to define the thumbnail size which is used.
but, as I suspected, you are not using this optionMarch 16, 2024 at 5:01 pm #1437373 -
AuthorPosts
- You must be logged in to reply to this topic.