404 error – How to include a php file in 404.php file?
Question
I have created a log to track some attacks on a website. At the moment I have included it directly in the 404 file like this:
<?php get_header();
global $porto_settings;
require_once(ABSPATH.'log404.php' );
?>
HTML Code
<?php get_footer(); ?>
I know it’s not the correct way but I’ve searched and I can’t find how to include the log.php in the 404 file with a snippet. (I use the code snippet plugin)
Also, what would be the correct way to include it, in the header or in the footer? with the same snippet…
0
2 months
2023-04-01T12:21:47-05:00
2023-04-01T12:21:47-05:00 0 Answers
0 views
0
Leave an answer