Share

Functions.php is a file that exists in your theme directory in WordPress. It allows you to add to or change the default behaviour of WordPress.

Many people install plugins to do every small task in WordPress. This really slows down your site!

Instead of adding lots of plugins, many times, you can just add a few lines of code to the functions.php file to achieve exactly the same.

That is the purpose of this site, to show you some of the things you can do!

How do you edit the functions.php?

There is a file editor in WordPress admin, but that is truly awful. Do not use it! There is no syntax highlighting. This makes mistakes much more likely!!

The best way is using a text editor like Sublime Text (which is what I use for local development).

For live work on remote servers, I use a service called Code Anywhere.

I highly recommend Code Anywhere. It has an interface almost the same as what I’m used to in Sublime Text, but you can operate it in any browser! You can code from your tablet, laptop or internet cafe and all your files will be open just the same as you move between devices! It has file revisions and even a test VPS feature.

Before you do anything with your functions.php, if you haven’t already, you should create a CHILD THEME and edit the functions.php in your child them directory.

DO NOT edit the functions-php in your parent theme directory. Otherwise, you risk losing all your changes when the theme updates!


Share