I would customize my 404 page but i have two problems. When i try to change the words in my 404.php like this :
<div class="col-md-10">
<h2><?php _e( 'OOOPS!', 'illdy' ) ?></h2>
<p><?php _e( 'Malheureusement la page que vous semblez chercher n'est plus disponible. N'hésitez pas à utiliser notre barre de recherches en bas de page ou à revenir sur notre page d'accueil en utilisant le menu en haut de page.', 'illdy' ) ?></p>
" class="button"><?php _e( 'Home', 'illdy' ) ?>
then my 404 is broken.
I would to change my page title (“Page not found”) but i see this anywhere.
function theme_slug_filter_wp_title( $title ) {
if ( is_404() ) {
$title = ‘ADD 404 TITLE TEXT HERE’;
}
// You can do other filtering here, or
// just return $title
return $title;
}
// Hook into wp_title filter hook
add_filter( ‘wp_title’, ‘theme_slug_filter_wp_title’ );
You would have to add that in the header.php file via Appearance > Editor. Please use the following plugin to make a backup of your WordPress before making any changes: