• Resolved adhdcelt

    (@adhdcelt)


    I have a wordpress site on a WAMP localhost install using a child of the twentyten theme. All plugins activated, all updates recent, beautiful, no problems.

    So, I install the twentyfifteen theme and create a child folder for it.

    I copy twentyfifteen footer.php, functions.php, header.php, sidebar.php, and sytle.css files to the twentyfifteen child folder, just like I did for the twentyten child.

    All folders are in the themes folder along with the twentyten child folder, so everything is where it needs to be.
    These are the changes I made in the twentyfifteen_child style.css file:

    Theme Name: twentyfifteen_child
    Template: twentyfifteen
    ————————————————*/
    @import url(‘../twentyfifteen/style.css’);
    /*———————————————-*/

    Now, I activate the twentyfifteen_child theme, and this is what I get:

    “Fatal error: Cannot redeclare twentyfifteen_widgets_init() (previously declared in C:\wamp\www\wordpress\wp-content\themes\twentyfifteen_child\functions.php:131) in C:\wamp\www\wordpress\wp-content\themes\twentyfifteen\functions.php on line 141”

    I don’t know what the above message means.
    So, I deactivate all plugins: Same problem.
    I installed the latest wp-admin and wp-includes folders: Nothing changes.
    I try the Iconic One theme: Same procedure; same problem.
    I try the Asteroid theme: Same procedure; same problem.
    Twentyfifteen works without the child.
    Iconic One works without the child.
    Asteroid works without the child.
    I go back to the twentyten child: No problem; beautiful.

    I don’t think the site is hacked, because it has never been live. Besides, it works fine with the twentyten child.

    I can’t figure it out.
    Any help here will be greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Your functions.php in the child theme cannot repeat the same code that is in the original functions.php, you will add any new functions to your child themes functions.

    Delete what you have in the child theme functions and try it.

    Thread Starter adhdcelt

    (@adhdcelt)

    Well, cccamuseme, there’ll be a little somethin’ extra in your check next week :-).

    Since it was years ago, I cannot remember how I got the twentyten child to work. I must have put a blank functions.php file in it, because your fix did the trick. I just set up the Asteroid child, and it loaded right up.

    MG! You saved my A, cccamuseme.
    Thank you so very much, and I wish you the best that life has to offer.

    Chris Cook

    (@cccamuseme)

    Glad to help.

    Happy Coding!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can't get new child theme to work’ is closed to new replies.