This topic is: not resolved
- This topic has 29 replies, 2 voices, and was last updated 4 years, 2 months ago by .
You must be logged in and have valid license to reply to this topic.
Homepage › Forum › Product Support › BeStruct › When manually displaying 404 errors, the page is empty
Tagged: 404 error page
Hello!
There was a question. I think this is a bug.
In the functions.php file, we have written the following code:
$url = $_SERVER['REQUEST_URI'];
if ( ($url == '/blog/') || ($url == '/category/articles/') ) {
global $wp_query;
$wp_query->set_404();
status_header( 404 );
nocache_headers();
include( get_query_template( '404' ) );
die();
} else {}
This code raises 404 error and includes 404.php file
But there was a problem.
The 404 page itself works correctly. Example: https://proremdom.ru/dfs
But those pages are just a blank sheet. Example: https://proremdom.ru/blog/
The title contains the correct 404. But the page itself did not load.
If you hide the line in the header.php file: $ yolo_footer_id = yolo_include_footer_id (); http://joxi.ru/L21ZbD5T0z51zA Then you get the following: http://joxi.ru/823RpDWc8aoLnm
I do not know why this happens. But it shouldn't work that way.
Please help with this problem
You must be logged in and have valid license to reply to this topic.