• Resolved terryclothdoll

    (@terrycloth-doll)


    As Kadence Themes suggested here, I created a child theme based on Virtue so I could disable the hard-cropping of catalog images and have my changes persist across Virthue theme updates.

    I copied the file virtue/woocommerce/content-product_cat.php to virtue-child/woocommerce/content-product_cat.php. I changed the line containing

    $catimgheight = 130;

    to

    $catimgheight = null;

    As the WP Codex says, I also created the style.css and functions.php files, with the minimal code they say is required.

    When I try to activate the child theme, I get the message: “The active theme is broken. Reverting to the default theme.”

    Am I missing a step? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • stephencottontail

    (@stephencottontail)

    Can you post the contents of style.css? If it’s too long, post it to Pastebin instead.

    Thread Starter terryclothdoll

    (@terrycloth-doll)

    Contents of virtue-child/style.css:

    /*
     Theme Name:   Virtue Child
     Description:  Virtue Child Theme
     Template:     virtue-child
     Version:      1.0.0
     Text Domain:  virtue-child
    */
    
    .kad_tagline {
    	font-size: 150%;
    	line-height: inherit;
    }
    
    .product_meta {
    	font-size: inherit;
    }
    stephencottontail

    (@stephencottontail)

    When you use a child theme, Template: needs to be the same as the parent theme’s folder:

    Template: virtue

    Thread Starter terryclothdoll

    (@terrycloth-doll)

    Aha! Looks like I misunderstood the WP Codex article.

    Thanks for you help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable catalog image cropping by changing `$catimgheight` breaks child theme.’ is closed to new replies.