From the course: WordPress: Building Child Themes

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Understanding functions.php

Understanding functions.php - WordPress Tutorial

From the course: WordPress: Building Child Themes

Start my 1-month free trial

Understanding functions.php

- [Instructor] WordPress ships with a ton of useful functions that allow us to quickly pull content from the database or perform actions on that content. You can find a full rundown of these functions along with hooks, classes and methods at developer.wordpress.org. These functions play a big part in making WordPress easy to use and easy to customize. But to actually use these functions, we have to write the code somewhere and if you're customizing a theme like we are the best place to put that code is in your themes functions.php file. All themes have a functions.php file. And it's used for two distinct purposes. First off, functions.php is the file used to set up the features of the theme. I'll go to my 2019 parent theme and I'll go to functions.php. And in here you'll find things like the featured image sizes, html 5 support, POST formats, and the configuration of custom menus. You'll also find all the style sheets and JavaScript files that are being en queued. Functions.php is…

Contents