Primary Nav

Editing the functions.php file

Careful, this is an important file and it will bring down your site if you do one tiny wrong thing.

Here are the very basics:

  1. Child theme: Best practice: you should always use a child theme. You should then only use the functions.php file of the child theme.
  2. Careful: One extra space or bracket or slash can break the file … and bring down your site. No, really. See #3.
  3. FTP: Check first (please … ) to see that you have FTP or some sort of editing access to the functions.php file before you start making changes to it. This could be through FTP or cPanel or anything other than WordPress. Because your WordPress admin will also be inaccessible. Honest and truly.
  4. Backup: speaking of FTP, make sure you have a backup of the functions.php file before you start editing.
  5. #3: Did you check #3 yet? If you didn’t, do you have the cell phone number of your developer? At least the login credentials for your hosting account?

Completely empty functions.php file looks like this:

I know, it’s empty.

Functions.php file without any functions in it looks like this:

That means there is nothing happening. No functions being called. It’s just the opening and closing tags of the file. It’s as good as empty. Well, empty might be even safer.

Functions file with comments or notes:

Functions file with notes and working functions:

That’s about it. Here’s a screenshot of a functions.php file:

Editing the functions.php file can be a dangerous--although powerful--operation. Careful in there!

Editing the functions.php file can be a dangerous–although powerful–operation. Careful in there!



  1. Write Every Day Challenge - September 16, 2013

    […] Editing the functions.php file (Sep 16) […]

  2. Add a Search Box in the Primary Navigation of Canvas - September 27, 2013

    […] Update: I created a new help file: Editing the functions.php file. […]

  3. Lots of WOO Themes Canvas CSS Tweaks - October 25, 2013

    […] CAREFUL: when editing the functions.php file, if you break it, your site will mostly likely go down. You’ll then need FTP access to change the functions.php file. Be ready. Here’s some basic help editing that functions file. […]

Leave a Reply