• When I copy functions.php as is from the twenty eleven theme directory to my twenty eleven child theme directory (I want to edit it lateron), I obtain the error below:

    Fatal error: Cannot redeclare twentyeleven_excerpt_length() (previously declared in /var/www/vhosts/[blogname]/httpdocs/wordpress/wp-content/themes/twentyeleven_child/functions.php:318) in /var/www/vhosts/[blogname]/httpdocs/wordpress/wp-content/themes/twentyeleven/functions.php on line 320

    Any ideas?

    Thanks!

Viewing 5 replies - 16 through 20 (of 20 total)
  • @mrnabo

    Please start your own topic; your issue is actually different from the issue in the OP.

    Thanks,

    Chip

    Hi,
    I am very, very beginner on WordPress themes or codes or anything.

    I’m using Sliding Door theme. I saw that you should create a Child Theme (style.css) so i did, and it seems to be working fine. I want to add a widget to my sidebar and the instructions (from the widget source) said to add their code to my functions.php. I am also going to use a custom logo, so thinking I also need to bring my header.php into my child theme?? I’m clueless and just don’t want to lose my changes when WP updates, as everyone says i will.

    Chip, you said the following above:
    Start with a blank – or even a nonexistent – functions.php file in the Child Theme. You may or may not even need it; but start there, and make sure all of your style and template changes are working. Only then should you even worry about any functional changes you want to make.

    You also said to “make sure all of your style and template changes are working.”
    I’m pretty sure my style.css is working but what are the “templates” you refer to?

    Thank you in advance for your help.

    Hi again,
    I don’t think i am in the right forum. You have the topic, but i am not having the same problem. I am going to post in the “How to” forum.

    Thanks!!

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @allforjc2, Please create your own thread with your own details. Don’t interrupt someone else’s thread like that, it’s considered impolite.

    I have the same problem i use weaver theme but everytime it is updated i need to remember to edit it and incert code for certian functions on my site to work
    Any idea how i can do this without having to enter the code every time i update

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘functions.php will not work with child theme’ is closed to new replies.