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

Solution: Change posted by - WordPress Tutorial

From the course: WordPress: Building Child Themes

Start my 1-month free trial

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…

Contents