• Resolved Bperth

    (@bperth)


    Version 3.6 Theme = attitude
    I’ve created a child theme (attitude-child) and placed a basic style.css file in the /var/www/wp-content/themes/attitude-child directory.
    I then changed to the child theme using the web interface.
    It worked as expected.
    However, if I copy the functions.php file from the parent theme directory into the child directory, the site fails (white screen in browser).
    I’ve checked permissions/chown etc.
    What am I doing wrong?
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • if I copy the functions.php file from the parent theme directory into the child directory

    That’s where you are going wrong. The child theme’s functions.php file should only contain customised functions – not a complete copy of the parent’s. Start by just uploading a blank functions.php file to the child theme that contains only an opening <?php line.

    Thread Starter Bperth

    (@bperth)

    Thanks for your reply esmi,

    How can I change the behaviour of a function in the parent theme’s functions.php?

    That very much depends upon the parent theme’s function and whether it is enclosed in an if ( ! function_exists( 'function_name' ) ) conditional or perhaps adds a filter that can be used in a child theme. Contacting the theme’s author by posting in https://www.ads-software.com/support/theme/attitude might help. As would posting a copy of the function you want to change.

    Thread Starter Bperth

    (@bperth)

    Thanks esmi,
    I’ve changed to twentythirteen which appears to behave as your if statement suggests.
    It seems to me that a theme without this behaviour greatly undermines the purpose of child themes.
    Then again I’m only a newbie, maybe I’m missing something.
    Thanks again

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘child theme problem’ is closed to new replies.