- This topic has 10 replies, 3 voices, and was last updated 5 years, 2 months ago by Dave.
March 14, 2017 at 3:54 pm #291554Dave
Every time I update the GP theme (I just did it now), I refresh the site and it gives me this:
Warning: require(/homepages/43/d622919337/htdocs/dev/wp-content/themes/generatepress/inc/woocommerce.php): failed to open stream: No such file or directory in /homepages/43/d622919337/htdocs/dev/wp-content/themes/generatepress-child/functions.php on line 256 Fatal error: require(): Failed opening required '/homepages/43/d622919337/htdocs/dev/wp-content/themes/generatepress/inc/woocommerce.php' (include_path='.:/usr/lib/php5.5') in /homepages/43/d622919337/htdocs/dev/wp-content/themes/generatepress-child/functions.php on line 256
I know it has something to do with my child theme but why does it always happen? I use Child Theme Configurator to make my GP child theme.GeneratePress 1.3.45GP Premium 1.2.95March 14, 2017 at 3:57 pm #291557TomLead DeveloperLead Developer
Likely because your child theme functions.php file has all of the GP functions in there, when it should only consist of your custom functions.
If you remove all functions in your functions.php file except for the custom functions you’ve added, it won’t be a problem.March 14, 2017 at 4:11 pm #291566Dave
Yup that’s what it was – fixed now. So last time this happened, it was the same thing. I know for sure I had only the custom functions in the child functions.php. Maybe it the Child Theme Configurator. Do you recommend a method for creating child themes that work well with GP?
– DaveMarch 14, 2017 at 4:13 pm #291569TomLead DeveloperLead Developer
A child theme should just be completely empty to start, and then you add what you need when needed.
It should have an empty style.css file, and an empty functions.php file.
You can find a blank child theme here: https://docs.generatepress.com/article/using-child-theme/March 14, 2017 at 4:48 pm #291582Dave
Ok sounds good, thank you.March 14, 2017 at 4:59 pm #291585Dave
Ok one other questions – pretty sure its related to the new theme. My mobile site is all screwed up now:
I do have some CSS that incorporates negative margin values – that could be causing it… but its was never a problem until about an hour ago after the theme update.March 14, 2017 at 5:02 pm #291591TomLead DeveloperLead DeveloperMarch 14, 2017 at 5:18 pm #291607Dave
That is definitely whats causing it. I removed them and the mobile looks much better. The reason I have negative margin is to space the content properly on the page on desktop view.
Would it be good practice to use @media max width in css and target the larger screen size? That way mobile is unaffected?March 14, 2017 at 5:18 pm #291608Dave
Or I guess it would be @media min widthMarch 14, 2017 at 5:23 pm #291610LeoStaffCustomer Support
Depends on what you are trying do. Sometimes it’s good to target mobile only and sometimes it’s good to target desktop only.March 14, 2017 at 5:47 pm #291616Dave
Ok cool. Yah I targeted min width 1025 and it worked like I want it too.
- You must be logged in to reply to this topic.