Hey everyone, welcome to another WordPress Wedneday.
My name is Kori Ashton here at WebTegrity in beautiful San Antonio, Texas.
I wanted to share with y'all, today, a little bit about what's called a 404 page
on your WordPress website, or for that matter, any website.
But, we're talking specifically about WordPress.
So, what happen if somebody comes to your website and they type in a link or
they have an old bookmark of something and that page no longer exists on your
website, right?
So, it's a broken page.
This is called a 404 page on your website and your's is gonna look completely different
depending upon your author and the theme that you're using inside of WordPress.
But, what I want to point out to you is that it's really important to be sure that you
have a 404 Page in place on your website.
You also want to be sure that it offers the viewer really great options, so it's not just a
"Oops, that sucked" without helping them to understand how to redirect, right?
So, we want to give them plenty of options on the 404 Page.
So, how do we do that? What does that look like?
The way you can test this is by going to your own website and just typing in some jibberish
after the dot com.
You can type in whatever you want (speaks in jibberish)
and click "Enter" and it should bring you to what's called a "Page Not Found"
or a 404 Page, that should display and show you "Oops".
Something around those lines. Along that line with that message.
If you do not have one of these, you need to consider a totally different theme;
because, your author is a dingaling.
Every author should have a 404 Page in there.
But, there is a good possibility that the author has not given you this really
great search feature in here or any sort of options for suggestive locations
for them to move toward.
So, how would you change them and customize the message that's in the
404 Page.
Here we go. I'm going to take into an area under "Appearance" and go into
your editor area.
Now, normally I would tell you, "No, no, no. Keep your hands out of here."
Because, it's kind of intimidating and you think you have to know PHP; but,
the beauty about PHP is that it's blended with HTML and if you're
used to using HTML you can get back here and not mess up anything too
badly.
We'll always want to remember, though, if you're editing any of PHP files, you always
want to be using a Child Theme, right.
I'm gonna put a link in the description box below to teach you how to set up
a Child Theme.
Because, any time you come into your PHP files and you make a change, whenever
you go to update that theme, unfortunately these files revert back to their default and
any customization you've done inside of these you will lose.
So, notice that I clicked on the 404.PHP File and very typically, these are gonna look a little
bit different in your theme; but, you should have one named "404 PHP".
We're gonna click on that and that's gonna bring up the screen here, to let us see exactly how
that page is being displayed and what content is on that page.
What I want us to look for is this bit of text here: "Oops. That page can't be found."
I want us to see if we can find that text in this area and see if we can edit that.
Here it is, right here. "Oops. That page can't be found."
So, you can rewrite that and say "Whoops", if you wanted to.
You could say "Oh no! So sorry!".
Whatever you wanted to say there to apologize that whatever they were
looking for, obviously wasn't found.
What you could do, if you don't have a search function or if you don't have
any of these options that this author coded for me, is you could just
simply write in a custom message that says,
"You might want to try the menu bar above to find more options or
click here to return to our homepage"
Give them some sort of option; because, the last thing you want them to do is
land on a page that is broken on your website and get frustrated and
move away from you.
You always want to keep them paying attention to your website.
Keep them coming back to you.
So, what you could do here is you're gonna see that this is set to an H1.
This is HTML this should not be too intimidating for you.
H1 and then it's dynamically displaying the content.
It's echoing out the content of "Whoops, that page can't be found"
and then, it's closing that H1 tag, right.
That's in the page header, up here.
Then, I want to look for "It looks like nothing was found at this location".
I want to look for that text. Here it is right here.
"It looks like nothing was found at this location."
"Maybe try one of the links below or search?"
This isn't really a question.
So, I'm just gonna take out this question mark and
put a period there.
And, it's gonna still have a question mark here, until I click this button down here.
It says update file. It's gonna be a blue color, it depends on your color scheme
to your user setting.
But, "Update File". Click that.
Now, I'm gonna come here and click refresh.
This should now be a period.
"Maybe try one of the links below or search" and then, this now says "Whoops"
So, really do a great customization job here to really engage people and let
them know that you apologize for the inconvenience; but, please redirect and
try to find another page.
So, let's say here, maybe try one of the links below or search
(typing)
Let's do a comma or "or visit our homepage".
So, remember inside of PHP you can type HTML.
So, let's add a link, right here to our homepage.
(typing)
And we want to link this little bit of text right here.
So, that people can easily throw in a title.
"Homepage". Alright.
A little quick snippet of code in there.
I'm gonna click "Refresh" here.
And now, I should have something that says,
"It looks like nothing was found in this location. Maybe try one of
the links below or search or visit our homepage".
So, when I click on that, it immediately takes me back to our homepage for the blog.
You can do anything like that to be sure that all the viewers on your website
have a really great experience, even if they've landed on some sort of a random
"Whoops" page.
Alright, I hope that helps you. Be sure to join us next week for WordPress Wednesday.
If you have any questions or you're struggling with something on your
WordPress website, please comment in the box below.
Let us know either this video helped you or maybe you've got a question that I
can actually create a video for.
I'd love to help you out.
I'm Kori Ashton. You can find me on Twitter @WebTegrity or @KoriAshton.
I'll talk to you next week.
Bye, bye y'all.