Homepage › Forum › Product Support › BeStruct › When manually displaying 404 errors, the page is empty
Tagged: 404 error page
This topic contains 29 replies, has 2 voices, and was last updated by Jackie 4 months ago.
-
AuthorPosts
-
4 months, 1 week ago #22970
Hi again.
Sorry for the late response.
Yes, we have enabled the wp_debug to check that issue.
Can you give us the FTP account? We need to check your source code. To fix the blog page, you also need to check the child theme custom again. As I said, you also do the custom with the theme function on the framework folder. That is a reason some functions in the template can't work.
Thanks.
4 months ago #23001This reply has been marked as private.4 months ago #23002Provided FTP access.
Please be careful. Disable error output after scanning is complete. This site is not a test site.
4 months ago #23004Yes, We have checked your site and found the issue from your custom function on the child theme:
$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 {}
After commented that code, the blog page works fine: https://proremdom.ru/blog/
Please check it again.
Thanks.
4 months ago #23005And what have you done?
Pages /blog/ and /category/article/ should return 404. That's why this code was written.
I wrote to you about something completely different.
4 months ago #23006My question was not resolved
4 months ago #23007Если не понимаете на ENG, могу писать на RUS.
Эти страницы должны отдавать 404. Как раз код, что вы убрали, и делал эту работу. Мой вопрос состоял вообще в другом. Почему была белая страница, а не красивая стандартная 404? Где именно ошибается ваш скрипт?
4 months ago #23013Hi again.
Sorry for the mistake. If you want to disable blog on your site, you can try this plugin: https://wordpress.org/plugins/disable-blog/
Please try it again.
Thanks.
4 months ago #23014404 page that opened with the 404 code title.
Now a white page opens with a 404 code title.
What is not clear to you? The question is correct, but you are trying to do everything except him.
I can put any 404 URL at any time and it should be 404. Not like now.
4 months ago #23023Am I understanding correctly: the error is in your topic, but you either can't solve it or don't want to?
And we will have to solve this mistake on our own?
4 months ago #23025Hi again.
I have found a solution to help you return the blog page to 404 by copy the 404.php file content to: /wp-content/themes/yolo-bestruct-child/templates/archive.php
Please check it again.
Thanks.
4 months ago #23031Eh ...
In general, this is a workaround for the error, not a solution.
Since I will have to replace or rewrite the content for all pages where I need to expose a 404 error.
4 months ago #23032You have a problem here. Work with your programmers to come up with a solution. I think you need to modify the theme and fix this bug. Since the code that caused the 404 error for me is standard WordPress code.
4 months ago #23053The error is a global bug of your theme and analyzes all users.
Now my blog and all its categories have stopped working altogether. I didn't ask for this, but you broke it.
Let me know about the changes you made so that I can undo them.
4 months ago #23054Hi.
We have changed the code at this file: /wp-content/themes/yolo-bestruct-child/templates/archive.php
We also have the backup for that file at the link: /wp-content/themes/yolo-bestruct-child/templates/archive_.php
Please check it again.
Thanks.
-
AuthorPosts
You must be logged in and have valid license to reply to this topic.