I have a WordPress plugin that has the following code inside header.php:
<?php
if (the_subtitle("","", false) == "") {
the_title();
} elseif(is_404()) {
echo "404";
} else {
the_subtitle();
}
?>
Basically, this should happen:
- If subtitle is present, echo subtitle.
- If no subtitle is present, echo title.
- If 404, echo "404".
But for some reason, when I locate my 404.php page, there is nothing displayed. Why?