{"id":3107,"date":"2019-08-24T20:00:56","date_gmt":"2019-08-24T15:00:56","guid":{"rendered":"https:\/\/webplover.com\/hosting\/?p=3107"},"modified":"2020-10-21T09:38:32","modified_gmt":"2020-10-21T04:38:32","slug":"wordpress-functions-php","status":"publish","type":"post","link":"https:\/\/webplover.com\/hosting\/wordpress-functions-php\/","title":{"rendered":"What is functions.php in WordPress"},"content":{"rendered":"<h2 class=\"h2-note\">What is functions.php<\/h2>\n<p><code>functions.php<\/code> file is called the brain of WordPress theme. It is a php file which exists almost in every theme <i>(wp-content\/themes\/your-theme\/functions.php)<\/i>. It adding features and extends the functionality of WordPress and behaves like a <a href=\"https:\/\/webplover.com\/hosting\/blog\/install-wordpress-plugin\">plugin<\/a>. You can say that <code>functions.php<\/code> file controls the functions of a WordPress theme.<\/p>\n<h2 class=\"h2-note\">The use of functions.php<\/h2>\n<p>Usually <code>functions.php<\/code> file used to define PHP functions, WordPress functions and classes. You can add PHP functions and WordPress functions to WordPress hooks and filters inside <code>functions.php<\/code><\/p>\n<h2 class=\"h2-note\">How to create functions.php<\/h2>\n<p>If your theme haven&#8217;t <code>functions.php<\/code> file, you can easily create it by going to your theme files directory <code>wp-content\/themes\/your-theme<\/code> and create new file with the name of functions.php<\/p>\n<h2 class=\"h2-note\">functions.php in child theme<\/h2>\n<p>You can add <code>functions.php<\/code> file separately to your child theme, in this way you can extend or replace the parent theme&#8217;s functions.<\/p>\n<h2 class=\"h2-note\">functions.php vs plugin<\/h2>\n<p>The difference between WordPress plugin and <code>functions.php<\/code> is that each theme&#8217;s <code>functions.php<\/code> file loaded automatically by activating that theme and applies only on the current activated theme, while plugin loads when it is activated using <a href=\"https:\/\/webplover.com\/hosting\/blog\/install-wordpress-plugin\">plugin section<\/a> and applies to all installed themes.<\/p>\n<h3>Here are a few tutorials for you to read next:<\/h3>\n<ul class=\"related-posts-li\">\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/install-wordpress-plugin\">How to Install WordPress Plugin Step by Step<\/a><\/li>\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/display-wordpress-posts-in-grid-layout\/\">How to Display Your WordPress Posts in Grid Layout<\/a><\/li>\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/add-social-icons-to-wordpress-menu\/\">How To Add Social Media Icons To WordPress Menu<\/a><\/li>\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/find-post-page-category-user-id-wordpress\/\">How to Find Post, Page, Category, or User ID in WordPress<\/a><\/li>\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/create-table-in-wordpress\/\">How to create Table in WordPress [With Pictures]<\/a><\/li>\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/exclude-specific-category-posts-from-wordpress-homepage\/\">How to Exclude Specific Category Posts From Your WordPress Home Page<\/a><\/li>\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/change-footer-copyrigh-text-of-hestia-theme\/\">How To Change The Footer Copyright Text Of Hestia WordPress Theme<\/a><\/li>\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/send-push-notifications-from-wordpress-site\/\">How to Send Push Notifications from WordPress Site [With Pictures]<\/a><\/li>\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/install-wordpress-on-android\/\">How to host WordPress on Local Web Server of android [With Pictures]<\/a><\/li>\n<li><a href=\"https:\/\/webplover.com\/hosting\/blog\/backup-wordpress-site\/\">How to Backup Your WordPress Site Automatically [With Pictures]<\/a><\/li>\n<\/ul>\n<p><script src=\"https:\/\/apis.google.com\/js\/platform.js\"><\/script><\/p>\n<div class=\"g-ytsubscribe\" data-channelid=\"UCArLhGLL14dgeiIKwlu4jYA\" data-layout=\"full\" data-count=\"hidden\"><\/div>\n<p><strong>If you find this tutorial helpful, then please Subscribe to our <\/strong><a href=\"https:\/\/m.youtube.com\/channel\/UCArLhGLL14dgeiIKwlu4jYA\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>YouTube Channel<\/strong><\/a><strong> for video tutorials, and share this article on social media.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":220,"featured_media":4234,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[228],"tags":[],"class_list":["post-3107","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"acf":[],"_links":{"self":[{"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/posts\/3107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/users\/220"}],"replies":[{"embeddable":true,"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/comments?post=3107"}],"version-history":[{"count":0,"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/posts\/3107\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/media\/4234"}],"wp:attachment":[{"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/media?parent=3107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/categories?post=3107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webplover.com\/hosting\/wp-json\/wp\/v2\/tags?post=3107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}