Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #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”?

    #1437026

    so 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

    #1437073

    I 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

    #1437074

    can 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 option

    #1437373

    Hi,
    Thanks for your help Guenni007, Lin84 it sounds like you have sorted out what you wanted to achieve, if this is correct shall we close this thread then?

    Best regards,
    Mike

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.