• Hi. I try to add the PHP Code to my function php File of the child theme. But if i deactivate the plugin and try to regenereate the thumbnails, it gets back to all sizes. What im doing wrong? Attached a screenshot of the function.php File.

    Thank you for your help.
    SECC

    <?php
    
    add_action( 'admin_init', 'thb_custom_meta_boxes_secc' );
    
    function thb_custom_meta_boxes_secc() {
      
      $portfolio_metabox = array(  
        'id'          => 'portfolio_meta_style_secc',
        'title'       => 'Portfolio Settings - Secc',
        'pages'       => array( 'portfolio' ),
        'context'     => 'normal',
        'priority'    => 'high',
        'fields'      => array(
        	array(
        	  'label'       => esc_html__('Override Title', 'werkstatt'),
        	  'id'          => 'portfolio_title_override',
        	  'type'        => 'text',
        	  'desc'        => esc_html__('Enter a title here to override the portfolio title', 'werkstatt')
        	),
        	
        )
      );
      
    	ot_register_meta_box( $portfolio_metabox );
    }
    
    function cc_mime_types($mimes) {
     $mimes['svg'] = 'image/svg+xml';
     return $mimes;
    }
    add_filter('upload_mimes', 'cc_mime_types');
    
    add_image_size( 'medium_large', '0', '0', false ); 
    add_image_size( '1536x1536', '0', '0', false ); 
    add_image_size( '2048x2048', '0', '0', false ); 
    add_image_size( 'post-thumbnail', '80', '75', true ); 
    add_image_size( 'werkstatt-square', '0', '0', true ); 
    add_image_size( 'werkstatt-slider', '0', '0', true ); 
    add_image_size( 'werkstatt-blog', '0', '0', true ); 
    add_image_size( 'werkstatt-bloglarge', '0', '0', true ); 
    add_image_size( 'werkstatt-masonry', '0', '0', false ); 
    add_image_size( 'werkstatt-squarelarge', '380', '350', true ); 
    add_image_size( 'werkstatt-rectangle', '0', '0', true ); 
    add_image_size( 'werkstatt-tall', '0', '0', true ); 
    add_image_size( 'werkstatt-wide', '0', '0', true ); 
    add_image_size( 'werkstatt-square-small', '0', '0', true ); 
    add_image_size( 'werkstatt-square-2x', '0', '0', true ); 
    add_image_size( 'werkstatt-square-3x', '0', '0', true ); 
    add_image_size( 'werkstatt-square-mini', '0', '0', true ); 
    add_image_size( 'werkstatt-slider-small', '0', '0', true ); 
    add_image_size( 'werkstatt-slider-2x', '0', '0', true ); 
    add_image_size( 'werkstatt-slider-mini', '0', '0', true ); 
    add_image_size( 'werkstatt-blog-small', '0', '0', true ); 
    add_image_size( 'werkstatt-blog-2x', '640', '400', true ); 
    add_image_size( 'werkstatt-blog-mini', '20', '12', true ); 
    add_image_size( 'werkstatt-bloglarge-small', '320', '640', true ); 
    add_image_size( 'werkstatt-bloglarge-2x', '1280', '640', true ); 
    add_image_size( 'werkstatt-bloglarge-mini', '20', '10', true ); 
    add_image_size( 'werkstatt-masonry-small', '320', '9999', false ); 
    add_image_size( 'werkstatt-masonry-2x', '1280', '9999', false ); 
    add_image_size( 'werkstatt-masonry-3x', '0', '0', false ); 
    add_image_size( 'werkstatt-masonry-mini', '20', '9999', false ); 
    add_image_size( 'werkstatt-squarelarge-small', '0', '0', true ); 
    add_image_size( 'werkstatt-squarelarge-2x', '0', '0', true ); 
    add_image_size( 'werkstatt-squarelarge-3x', '0', '0', true ); 
    add_image_size( 'werkstatt-squarelarge-mini', '0', '0', true ); 
    add_image_size( 'werkstatt-rectangle-small', '0', '0', true ); 
    add_image_size( 'werkstatt-rectangle-2x', '0', '0', true ); 
    add_image_size( 'werkstatt-rectangle-3x', '0', '0', true ); 
    add_image_size( 'werkstatt-rectangle-mini', '0', '0', true ); 
    add_image_size( 'werkstatt-tall-small', '0', '0', true ); 
    add_image_size( 'werkstatt-tall-2x', '0', '0', true ); 
    add_image_size( 'werkstatt-tall-3x', '0', '0', true ); 
    add_image_size( 'werkstatt-tall-mini', '0', '0', true ); 
    add_image_size( 'werkstatt-wide-small', '0', '0', true ); 
    add_image_size( 'werkstatt-wide-2x', '0', '0', true ); 
    add_image_size( 'werkstatt-wide-3x', '0', '0', true ); 
    add_image_size( 'werkstatt-wide-mini', '0', '0', true ); 
    add_image_size( 'medium_large', '0', '0', false ); 
  • The topic ‘Image sizes in Child Theme’ is closed to new replies.