Languages: English • עברית • 日本語 Português do Brasil • Türkçe • (Add your language)
This Conditional Tag checks if 404 error is being displayed (after an "HTTP 404: Not Found" error occurs). This is a boolean function, meaning it returns either TRUE or FALSE.
<?php is_404(); ?>
This tag does not accept any parameters.
<?php
if ( is_404() ) {
// add search form so that users can search other posts
}
?>
Since: 1.5.0
is_404() is located in wp-includes/query.php
.