Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #687451

    Dear Enfold-Team,

    In brief, I want to stick with the default medium, medium-large, large and add some custom thumbs. I am using an Enfold Chiild and below is a part of my functions.php.
    In fact, the code works, the enfold sizes such as widget, square, … are not generated any more, however, it fails on the three shop-thumbs.

    Could you please assist on how to remove shop_catalog, shop_single, shop_thumbnail in an enfold child theme?

    Cheers,
    Elisabeth

    `add_filter( ‘avf_modify_thumb_size’, ‘my_enfold_customization_modify_img_size’, 10, 1 );
    function my_enfold_customization_modify_img_size( $size ) {
    $size[‘widget’] = array(‘width’=>0, ‘height’=>0); // small preview pics eg sidebar news
    $size[‘square’] = array(‘width’=>0, ‘height’=>0); // small image for blogs
    $size[‘featured’] = array(‘width’=>0, ‘height’=>0 ); // images for fullsize pages and fullsize slider
    $size[‘featured_large’] = array(‘width’=>0, ‘height’=>0 ); // images for fullsize pages and fullsize slider
    $size[‘extra_large’] = array(‘width’=>0, ‘height’=>0 , ‘crop’ => false); // images for fullscrren slider
    $size[‘portfolio’] = array(‘width’=>0, ‘height’=>0 ); // images for portfolio entries (2,3 column)
    $size[‘portfolio_small’] = array(‘width’=>0, ‘height’=>0 ); // images for portfolio 4 columns
    $size[‘gallery’] = array(‘width’=>0, ‘height’=>0 ); // images for portfolio entries (2,3 column)
    $size[‘magazine’] = array(‘width’=>0, ‘height’=>0 ); // images for magazines
    $size[‘masonry’] = array(‘width’=>0, ‘height’=>0 , ‘crop’ => false); // images for fullscreen masonry
    $size[‘entry_with_sidebar’] = array(‘width’=>0, ‘height’=>0); // big images for blog and page entries
    $size[‘entry_without_sidebar’]= array(‘width’=>0, ‘height’=>0 ); // images for fullsize pages and fullsize slider
    $size[‘shop_thumbnail’] = array(‘width’=>0, ‘height’=>0);
    $size[‘shop_catalog’] = array(‘width’=>0, ‘height’=>0);
    $size[‘shop_single’] = array(‘width’=>0, ‘height’=>0, ‘crop’ => false);

    // now define our own sizes for the gallery
    // $size[‘gallery3’] = array(‘width’=>640, ‘height’=>640, ‘crop’ => false); // images for portfolio entries (3 columns in our style)

    return $size;
    }

    #689171

    Hey Elisabeth,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    Login credentials include:

    • The URL to the login screen.
    • A valid username (with full administration capabilities).
    • As well as a password for that username.
    • permission to deactivate plugins if necessary.

    Best regards,
    Yigit

    #691382

    Thanks, below the data.
    The site is not live yet, feel free to do anything you want :)

    • This reply was modified 8 years, 2 months ago by elisabeth.
    #692936

    Hi,

    Please revert the modifications then follow the instructions here.

    // https://kriesi.at/support/topic/image-upload-2/#post-614738

    Don’t forget to regenerate the thumbnails.

    Best regards,
    Ismael

    #696928

    Thanks Ismael!

    For the archives (all sizes mentioned, take what u need):

    function ava_image_sizes_remove() {
    remove_image_size('masonry');
    remove_image_size('magazine');
    remove_image_size('widget');
    remove_image_size('featured');
    remove_image_size('featured_large');
    remove_image_size('extra_large');
    remove_image_size('portfolio');
    remove_image_size('portfolio_small');
    remove_image_size('gallery');
    remove_image_size('entry_with_sidebar');
    remove_image_size('entry_without_sidebar');
    remove_image_size('square');
    remove_image_size('shop_thumbnail');
    remove_image_size('shop_catalog');
    remove_image_size('shop_single');
    }
    add_action( 'after_setup_theme', 'ava_image_sizes_remove', 11 );

    Fun fact: update_option works for WP-sizes only, for enfold-defined types I needed the code below:

    // change the default medium_large to 1600x1067
    update_option('medium_large_size_w',1600);
    update_option('medium_large_size_h',1067);
    function ava_image_sizes_change( $size ) {
      $size['entry_with_sidebar']  = array('width'=>1920, 'height'=>1280);        // big images for blog and page entries
      $size['entry_without_sidebar']= array('width'=>1920, 'height'=>1280 );      // images for fullsize pages and fullsize slider
      return $size;
    }
    add_filter( 'avf_modify_thumb_size', 'ava_image_sizes_change', 10, 1 );
    #697035

    Hey!

    Happy you got it short out.
    Please feel free to let us know if we can do anything else for you.

    Thanks a lot

    Cheers!
    Basilis

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Enfold Child: remove shop_single, shop_catalog, shop_thumbnail in functions.php’ is closed to new replies.