Option for custom error.php - Forum | JoomShaper
Staff replied SP Page Builder

Option for custom error.php

Asked by Johannes Schober 1 month ago Last activity 1 month ago

Hi,
you have a great tutorial for creating a custom 404 page. However, when an update is carried out, the ‘error.php’ file is overwritten. Would it be possible to include an option to create your own php file for a custom 404 page?

I testet it with simply inserting this lines into error.php after the "use" namespace imports :
$custom_error_file = DIR . "/custom_error.php";
if (file_exists($custom_error_file)) {
include $custom_error_file;
}

1 reply

Log in to reply.