what is functions php in wordpress

What is functions.php in WordPress

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:

If you find this tutorial helpful, then please Subscribe to our YouTube Channel for video tutorials, and share this article on social media.

Similar Posts

One Comment

  1. Vijay Deshmukh says:

    In WordPress installation on localhost how automatically import sql file in server I mean can we import our .sql file from webpage or website

Leave a Reply

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