WordPress functions.php File

Functions.php is a file found in your Theme’s folder. To understand the file location, look at the following wordpress theme hierarchy.

Adding Code to the Functions File

The functions file is where you put various features and functionality within your wordpress theme. You can achieve this by defining your own functions or by calling built-in WordPress functions. For example, you can control :

  • Use of featured images
  • The image sizes supported by your theme
  • Widgetized areas
  • Decide whether to show post from a particular category in home page or not
  • And  more ….

You can produce the same results by using a WordPress Plugin. In other words the functions file behaves like a WordPress Plugin. But using lots of plugins can slow down your blog’s performance.

When You Shouldn’t Use functions.php

Functions.php is a theme-specific file, which means each theme has its own functions file and any code/function added there strictly related to that particular theme. As soon as you update theme or change your theme, your changes will be wiped out.  See how to use a child theme to add code without worrying about losing your changes.

Leave a Reply

Your email address will not be published. Required fields are marked *

*