Sometimes I entered a wrong slug in my wordpress and the result was showing the page bad.
I'd like to have a message like 404 page not found or something instead of this bad looking page.
I tried the
get_page_by_title('Page Title')) in to the page.php file, but it shows the error for both, the right page and the one with the wrong slug.
Can someone help me with this?