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.
Solution: Change posted by - WordPress Tutorial
From the course: WordPress: Building Child Themes
Solution: Change posted by
(bouncy techno music) - [Instructor] I hope you were able to figure it out. It can be really tricky to find the exact function to modify. Either way, follow along, and I'll show you how to do it. My first thought is to search by author name, but unfortunately, we can't search by author name because it's stored dynamically in the database. The code that prints this will just reference a variable, so instead, I'm going to dig into the HTML and see if there's some sort of identifying HTML that we can search for. So, I'll inspect element and up here I see span class byline. That seems pretty unique, so I'm going to use this to search. I'll copy byline, go back to my code editor, and, in my parent theme, I will search in this directory, type in byline and click Find All. And, I only see one result, which is great! This should be the one. Let's click into this file. I see a function that prints an icon, the author, a link, and a bunch of HTML for formatting. I also notice that this is a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
- Ex_Files_WordPress_Building_Child_Themes_Starting_Site.zip
- Ex_Files_WordPress_Building_Child_Themes_2.zip
- Ex_Files_WordPress_Building_Child_Themes_3.zip
- Ex_Files_WordPress_Building_Child_Themes_4.zip
- Ex_Files_WordPress_Building_Child_Themes_5.zip
- Ex_Files_WordPress_Building_Child_Themes_6.zip
- Ex_Files_WordPress_Building_Child_Themes_7.zip
Contents
-
-
-
-
-
-
(Locked)
Understanding functions.php2m 29s
-
(Locked)
Finding functions in the parent theme2m 13s
-
(Locked)
Modify a pluggable function4m 38s
-
(Locked)
Hooks, filters, and action2m 33s
-
(Locked)
Filter a function5m 25s
-
(Locked)
Hooking functions3m 14s
-
(Locked)
Challenge: Change posted by1m 2s
-
(Locked)
Solution: Change posted by2m 12s
-
(Locked)
-
-
-
-