Basically, every time I modify my functions.php file and reload it to the server my site "breaks" and nothing loads. As soon as I delete it, it starts working again. Now before anyone freaks out, I am using a child theme so I am not modifying the original theme.

Specifically what I'm trying to do is modify the function twentytwelve_content_nav. and by modify I mean remove. I don't want the links underneath each post and above the comments at all.

I've tried encasing the entire function in comment tags, the 'if' statement in comment tags, deleting various amounts of the code in attempts to do this but I always get the 'server error' page.

I am new to this and kind of an amateur, I appreciate any help that is offered. Thank you

  • 1
    Could you add an example of what code you're adding that results in a server error? What server error are you getting? Apr 13, 2013 at 1:29
  • 1
    Trying adding define('WP_DEBUG', true); to your wp-config.php. This should allow you to see an error message that will provide an indication of the underlying issue. codex
    – vancoder
    Apr 13, 2013 at 2:30
  • My guess is that you are removing a function that is used by the theme. If the theme is using the function you can't remove it without also editing all the places in the theme where the function is used.
    – s_ha_dum
    Apr 13, 2013 at 2:49

2 Answers 2


Yup, @s_ha_dum hit the nail on the head. The theme calls the function in a few places. Removing all of those function calls should fix any fatal errors you're having.

On line 28 of index.php you'll see how the Twentytwelve theme goes about utilizing the function. Search other files like category.php, author.php, archives.php, search.php and tag.php to make sure you'll catch all of them.

  • awesome, that makes a lot of sense!! thanks guys!!
    – Jeff
    Apr 13, 2013 at 16:02
  • Additional note, I still had some issues later, you can't put your functions.php into a child theme. That doubles up on all the functions and you can't have two functions with the same name. lesson of the day is function.php can't be put into a child theme.
    – Jeff
    Apr 15, 2013 at 4:49

Jeff - be careful as I've been caught out with this before when using child themes. I use the Genesis Framework which has Genesis as the Parent Theme and various child themes associated with it. Occasionally they release an update to the Parent Theme and I made the mistake of updating this and losing all my custom functions and CSS. Now all of my 'custom' mods are in the functions.php and style.css files in the Child theme directory.

You're right in that you need to avoid duplicating/redeclaring functions in both files but this may end up breaking your site later if you update the theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.