What is functions.php
functions.php file is called the brain of WordPress theme. It is a php file which exists almost in every theme (wp-content/themes/your-theme/functions.php). It adding features and extends the functionality of WordPress and behaves like a plugin. You can say that functions.php file controls the functions of a WordPress theme.
The use of functions.php
Usually functions.php file used to define PHP functions, WordPress functions and classes. You can add PHP functions and WordPress functions to WordPress hooks and filters inside functions.php
How to create functions.php
If your theme haven’t functions.php file, you can easily create it by going to your theme files directory wp-content/themes/your-theme and create new file with the name of functions.php
functions.php in child theme
You can add functions.php file separately to your child theme, in this way you can extend or replace the parent theme’s functions.
functions.php vs plugin
The difference between WordPress plugin and functions.php is that each theme’s functions.php file loaded automatically by activating that theme and applies only on the current activated theme, while plugin loads when it is activated using plugin section and applies to all installed themes.
Here are a few tutorials for you to read next:
- How to Install WordPress Plugin Step by Step
- How to Display Your WordPress Posts in Grid Layout
- How To Add Social Media Icons To WordPress Menu
- How to Find Post, Page, Category, or User ID in WordPress
- How to create Table in WordPress [With Pictures]
- How to Exclude Specific Category Posts From Your WordPress Home Page
- How To Change The Footer Copyright Text Of Hestia WordPress Theme
- How to Send Push Notifications from WordPress Site [With Pictures]
- How to host WordPress on Local Web Server of android [With Pictures]
- How to Backup Your WordPress Site Automatically [With Pictures]
If you find this tutorial helpful, then please Subscribe to our YouTube Channel for video tutorials, and share this article on social media.





