Error with child theme
-
Hello,
I am trying to set up a child theme for the WooCommerce Storefront theme. I have done child themes before without too much trouble, but for some reason, this one is very difficult. I have narrowed it down to what happens when I put the Template in the header.
Current header in my style.css is this:
/*!
Theme Name: Storefront-child
Theme URI: https://woocommerce.com/storefront-child
Author: WooThemes
Author URI: https://woocommerce.com/
Description: Storefront child theme
Version: 2.2.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Template: storefront
Text Domain: storefront-child
Tags: e-commerce, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, featured-images, full-width-template, threaded-comments, accessibility-ready, rtl-language-support, footer-widgets, sticky-post, theme-optionsWhen I activate the child theme, the following error comes up:
Fatal error: Cannot redeclare storefront_is_product_archive() (previously declared in /home1/lharkins/mu-tang.com/wp-content/themes/storefront-child/inc/storefront-functions.php:22) in /home1/lharkins/mu-tang.com/wp-content/themes/storefront/inc/storefront-functions.php on line 31
I did a lot of messing around to try and figure out what the problem is, and finally I started with a fresh directory and started changing things line by line, checking each time I changed something. The problem seems to be the Template line. Problems didn’t happen until I put that line in, and if I take the Template line out of the style.css, things appear to be fine.
I don’t know much code, so I don’t know what this error is or how to fix it.
Can you help?
Thanks
- The topic ‘Error with child theme’ is closed to new replies.