[Resolved] Same PHP error again

Home Forums Support [Resolved] Same PHP error again

Home Forums Support Same PHP error again

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #291554
    Dave

    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.45
    GP Premium 1.2.95
    #291557
    Tom
    Lead Developer
    Lead 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.

    #291566
    Dave

    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?

    – Dave

    #291569
    Tom
    Lead Developer
    Lead 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/

    #291582
    Dave

    Ok sounds good, thank you.

    #291585
    Dave

    Ok one other questions – pretty sure its related to the new theme. My mobile site is all screwed up now:

    Mobile site messed up

    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.

    #291591
    Tom
    Lead Developer
    Lead Developer

    Try removing all that negative margin – looks like that’s what causing the issue.

    #291607
    Dave

    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?

    #291608
    Dave

    Or I guess it would be @media min width

    #291610
    Leo
    Staff
    Customer 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.

    Checkout this post: https://generatepress.com/forums/topic/how-do-i-search-for-my-previous-posts/#post-263744

    #291616
    Dave

    Ok cool. Yah I targeted min width 1025 and it worked like I want it too.

    Thank you!

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.