Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #865177

    Hello,

    I used to have my thumbnails in a 3×2 aspect ratio.
    I got the solution from this topic: https://kriesi.at/support/topic/single-autor-small-preview-pic-aspect-ratio/

    .blog-meta, .blog-meta a, .blog-meta img {
    width: 220px !important;
    max-width: 220px !important;
    max-height: 170px;
    height: 170px;
    border-radius: 0px !important;
    }

    and:
    add_theme_support(‘avia_template_builder_custom_css’);
    add_filter(‘avf_blog_style’,’avia_change_category_blog_layout’, 10, 2);
    function avia_change_category_blog_layout($layout, $context){
    if($context == ‘archive’) $layout = ‘single-small’;
    return $layout;
    }
    add_filter(‘avf_blog_style’,’avia_change_tag_blog_layout’, 10, 2);
    function avia_change_tag_blog_layout($layout, $context){
    if($context == ‘tag’) $layout = ‘single-small’;
    return $layout;
    }

    add_filter( ‘avf_modify_thumb_size’, ‘enfold_customization_modify_thumb_size’, 10, 1 );
    function enfold_customization_modify_thumb_size( $size ) {
    $size[‘square’] = array(‘width’=>220, ‘height’=>150);
    return $size;
    }

    I removed all my plugings recently because https://kriesi.at/support/topic/catchable-fatal-error-when-use-pages-of-search-results/

    and now it doesn’t work anymore, can you help?

    Nevermind, it’s solved

    • This topic was modified 7 years, 1 month ago by Wolf.
    #865831

    Hey Wolf,

    Glad you got it working for you! :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #869591

    It is not working after all.

    I don’t know what is going wrong.

    .blog-meta, .blog-meta a, .blog-meta img {
    width: 220px !important;
    max-width: 220px !important;
    max-height: 150px;
    height: 150px;
    border-radius: 0px !important;
    }

    and

    add_filter( ‘avf_modify_thumb_size’, ‘enfold_customization_modify_thumb_size’, 10, 1 );
    function enfold_customization_modify_thumb_size( $size ) {
    $size[‘square’] = array(‘width’=>220, ‘height’=>150);
    return $size;
    }

    and changed the size in the normal function.php for the square to 220 x 150

    and regenerated the thumbnails, but it doesn’t work. The size is fine but the pictures get stretched.

    Any ideas

    #869836

    Hi Wolf,

    What do you need it to look like?
    Please disable the caching plugin while we are helping you.

    Best regards,
    Victoria

    #870790

    I disabled the caching.

    With Css I changed the size of the thumbnails, but now they look stretched.

    • This reply was modified 7 years ago by Wolf.
    #872272

    Hi,

    Yes, because the size has to change with a function and not with CSS.
    That is why they are resized.

    Try that plugin and let us know if it works

    Best regards,
    Basilis

    #873125

    hello,

    That plugin is not tested with the latest version of WP. Also it used to work without plugin, and it still works on a different enfold installation.

    I would like to know why this:
    add_filter( ‘avf_modify_thumb_size’, ‘enfold_customization_modify_thumb_size’, 10, 1 );
    function enfold_customization_modify_thumb_size( $size ) {
    $size[‘square’] = array(‘width’=>220, ‘height’=>150);
    return $size;
    }

    or directly changing the settings in function.php isn’t working.

    #873975

    Hi,

    Make sure to refresh the page after adjusting the thumbnail size. You can also use the following code to override the existing thumbnails.

    add_image_size( 'square', 220, 150, true ); //  existing thumbnail size
    

    Best regards,
    Ismael

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