• Resolved fierce

    (@fierce)


    This is the error I am getting:

    Fatal error: Cannot redeclare znn_customstyle() (previously declared in /home/fierce/public_html/wp-content/themes/zenon-lite-2/functions.php:21) in /home/fierce/public_html/wp-content/themes/zenon-lite/functions.php on line 60

    I was attempting to create a child theme using the one-click child plugin but it kept giving me errors. I have read other posts and used my host to delete the entire child theme and its contents but I am still getting this error and can’t access anything.

    Please help!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I would try deleting the theme and then re-installing it. If it was working before, hopefully a fresh copy will be able to bring your site to what it was before.

    If you try to make a child theme again, I would try to avoid having a new copy of functions.php in the child theme. Functions.php are quite picky and can really cause havoc.

    Thread Starter fierce

    (@fierce)

    Thanks for the help.

    I did manage to delete the theme and re-install with no issues.

    Still unsure about the best way to create a child theme though…

    The best way to create a child theme is only to have a style.css in your child theme folder.

    If you want to change some of the functions which are set in your partent theme, then you can’t simply copy the functions.php file from the parent theme and put it in your child theme.

    Instead you need to override the specific function.

    Have a look at this tutorial which uses Twenty Ten. It might point you in the right direction.
    https://wp.tutsplus.com/tutorials/theme-development/creating-a-simple-child-theme-using-twenty-eleven/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot access WP admin or anything else after attempting to create child theme’ is closed to new replies.