Error 404 on The Core Child
How can I configure in The Core Child template that on a site with non-existent pages the server produces a 404 error, i.e. how to activate the 404 page of this topic?
In the browser https://cpmiohio.com/wp-content/themes/the-core-parent/404.php produces an error:
Fatal error: Call to undefined function get_header () in /public_html/wp-content/themes/the-core-parent/404.php on line 6
I have what themes is parent: 2) The Core Parent
2) active: The Core Child, writes that: This is a child theme of The Core Parent.
* * *
there is no 404.php file in The Core Child folder, it is only in The Core Parent folder
What and where to change in Wordpress, for page 404 to work in The Core Child?
1) Change the Permalink Structure in ‘Settings’ -> ‘Permalinks’ to anything else but ‘Plain’?
2) add the code to the functions.php file of the The Core Parent:
function status_header_404(){
if( is_404() ) {status_header(404);}
}
add_action('wp_head', 'status_header_404');
-
Hi,
you don't need to change the code if you want to change the 404 page. You can build the page you want and then set it as 404 page in Appearance -> Theme Settings -> General: https://jmp.sh/MCWOpI5
btw: please note that we no longer support the Themefuse themes and here is the Brizy Community. Let's keep the discussion on the topic of this community :)
0 -
I have pages like https://cpmiohio.com/?page_id=bla-bla-bla normally give 404 pages, but pages like https://cpmiohio.com/bla-bla-bla somehow redirect to the main page with receiving code 200.
What to do?For the 404 page in the topic to work, I need change the Permalink Structure in ‘Settings’ -> ‘Permalinks’ to anything else but ‘Plain’?
0 -
Hi,
yes, this could be related to the permalinks settings. Please refer to this article: https://techbrij.com/wordpress-404-redirect-homepage-fix
0
Please sign in to leave a comment.
Comments
3 comments