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: Custom 404 page - WordPress Tutorial
From the course: WordPress: Building Child Themes
Solution: Custom 404 page
(upbeat music) - [Instructor] Here's where the 404 page started, and here's my finished 404 page. I started by finding the right template. And we can use the template hierarchy to do so. There's a 404.php in the template hierarchy, and our parent theme already has that file. All we have to do is copy it over. Then, I wanted to search for a nice image. I love using Unsplash since everything there is royalty free. You can use any images without any stipulations. I found this image, which I then imported into an image editing program like Photoshop to remove the background, resize it, and crop off the edges. We're going to use this image on the right-hand side, so the line of text isn't so long. Speaking of which, this is very boring text, so let's reword this. So I'll go to my code. Let's take a look at 404.php. And I reworded it to, you know, "We couldn't find the page you were looking for," and "It probably got lost in the baking supplies." I like a little bit of humor on my 404…
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