• Every page but my recent posts (including login page) are displaying:

    Fatal error: Cannot redeclare twentyfourteen_content_width() (previously declared in /home/content/43/11680543/html/mymediajuice/wp-content/themes/twentyfourteen-Child/functions.php:128) in /home/content/43/11680543/html/mymediajuice/wp-content/themes/twentyfourteen/functions.php on line 131

    web address is: http://mymediajuice.com/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter MWWDplus

    (@mwwdplus)

    now even the recent posts page is replaced by the error

    Thread Starter MWWDplus

    (@mwwdplus)

    I am using the Twenty-fourteen theme. I created a child theme from the theme I was customizing and added a fresh Twenty-fourteen theme to act as the parent. From what I have read the above error is caused by two identical declarations in the same place. So do I need to delete my child’s functions.php to correct this?

    Is the child theme’s functions.php file just a copy of the parent theme’s? Sounds like you have a function in the parent and child that is named the same thing,

    Thread Starter MWWDplus

    (@mwwdplus)

    Yea both are complete Twenty-fourteen themes

    Ok – When doing parent/child themes, a child theme is not meant to be a copy of the parent theme – it essentially is there to add or modify certain parts of the parent theme. Check out this page for more info http://codex.wordpress.org/Child_Themes

    Try using the fresh twenty-fourteen theme as the parent, and only add functionality to the child theme that you want to override. No need to have functions declared in both places (and it wont work anyways) because both functions.php files will be loaded.

    Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.)

    Thread Starter MWWDplus

    (@mwwdplus)

    So basically I need to delete the child’s functions.php?

    That would be one way to solve your error.
    There is no reason to use twenty-fourteen as a parent theme, if your child is going to have all the files copied over to it from the parent though.

    Thread Starter MWWDplus

    (@mwwdplus)

    I guess I could just wipe the child functions.php clean and use it for further modifications.

    I am just using it as parent and child to just set it up quickly I plan on majorly altering the child, just wanted to make sure I could still update.

    Thread Starter MWWDplus

    (@mwwdplus)

    Thanks for the conformation. I appreciate your help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Blog displaying a Fatal Error’ is closed to new replies.