I have been creating a child theme to twenty twelve on a localhost on my pc. Has been working okay until I got confused about the altering of the style.css and decided to put a copy of all the files from the parent into the child. Then I Lost the connection and this is the message i have ( Fatal error: Cannot redeclare twentytwelve_setup() (previously declared in C:\wamp\www\wordpress2\wp-content\themes\twentytwelve-child\functions.php:44) in C:\wamp\www\wordpress2\wp-content\themes\twentytwelve\functions.php on line 77)
not sure what to do. thanks for any help
I do apologise I put this on installations before I realised it should go on this fourm.
Either Log into your web hosting management OR get into your site with FTP, and rename (or delete) most of the files which with an excess of enthusiasm copied from your parent to your child theme. Certainly this would include the functions.php
The whole idea behind child themes is that you only have to get involved with files you need to change, you are free to have all the rest float by you.
If you are using functions.php to install customised functions, then you need to be careful to use names which do not colide with the parent, so your setup functio9n would become “mychild_setup()” or something.
thanks for ideas, I have fixed the issue. I finally used a one-click to make the child theme plugin so not sure about copies, so I will go and explore. I did originally get confused as I was trying to do the childtheme after already altering the parent. Then I discovered this was a bad move so tried to undo this and work on the child and got in a mess as to what to alter on the style.css sheet or as some youtube clips say copy the header and functions.
For me I understand more from video clips than written instructions so I have been finding it hard to learn wordpress from the wordpress.org site as most information seems to be in written form. I then searched the youtube for clips and there are so much mixed messages are out there. Any way I will keep trying at converting my serif website (which as an artist I loved using as it is all visual) into wordpress. I just wish there were more how to clips for tutorials on wordpress.org.
thanks for all your help.
- The topic ‘fatal error message can not redeclare etc with child theme of twenty twelve’ is closed to new replies.