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.

Hooking functions

Hooking functions - WordPress Tutorial

From the course: WordPress: Building Child Themes

Start my 1-month free trial

Hooking functions

- [Instructor] Something that's actually pretty common is there's some functionality added by your parent theme that you don't actually need. A good developer will remove that functionality that gets in the way. I try to remove any functionality that my client won't ever use. So let's say a client will never use the widget area at the very bottom of the site. The widget area controls the search, these recent posts, archives, meta, categories, et cetera. In that case, we can actually remove the widget area. That way, they won't be confused if they see it in the backend. And if they're configuring a different area, they won't make mistakes and add a widget to the wrong space. I can switch over to my code editor and I will open up my parents functions.php file. And if I do a quick search for widgets, I can see that there is a function called twentynineteen_widgets_init that adds that widget to the footer. So at a specific point when WordPress is loading, in this case, widgets_init, this…

Contents