- This topic has 10 replies, 3 voices, and was last updated 7 years ago by Dave.
-
AuthorPosts
-
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.
March 14, 2017 at 3:57 pm #291557TomLead DeveloperLead DeveloperLikely 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 #291566DaveYup 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?
– Dave
March 14, 2017 at 4:13 pm #291569TomLead DeveloperLead DeveloperA 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 #291582DaveOk sounds good, thank you.
March 14, 2017 at 4:59 pm #291585DaveOk 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 DeveloperTry removing all that negative margin – looks like that’s what causing the issue.
March 14, 2017 at 5:18 pm #291607DaveThat 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 #291608DaveOr I guess it would be @media min width
March 14, 2017 at 5:23 pm #291610LeoStaffCustomer SupportDepends on what you are trying do. Sometimes it’s good to target mobile only and sometimes it’s good to target desktop only.
Checkout this post: https://generatepress.com/forums/topic/how-do-i-search-for-my-previous-posts/#post-263744
March 14, 2017 at 5:47 pm #291616DaveOk cool. Yah I targeted min width 1025 and it worked like I want it too.
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.