<?php
/**
* The template for displaying 404 pages (not found).
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package GridRead WordPress Theme
* @copyright Copyright (C) 2025 ThemesDNA
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
* @author ThemesDNA <themesdna@gmail.com>
*/

get_header(); ?>

<div class='gridread-main-wrapper gridread-clearfix' id='gridread-main-wrapper' itemscope='itemscope' itemtype='http://schema.org/Blog' role='main'>
<div class='theiaStickySidebar'>
<div class="gridread-main-wrapper-inside gridread-clearfix">

<div class='gridread-posts-wrapper' id='gridread-posts-wrapper'>
<div class='gridread-posts gridread-box'>
<div class="gridread-box-inside">

<div class="gridread-page-header-outside">
<header class="gridread-page-header">
<div class="gridread-page-header-inside">
    <?php if ( gridread_get_option('error_404_heading') ) : ?>
        <h1 class="page-title"><?php echo esc_html( gridread_get_option('error_404_heading') ); ?></h1>
    <?php else : ?>
        <h1 class="page-title"><?php esc_html_e( 'Oops! That page can not be found.', 'gridread' ); ?></h1>
    <?php endif; ?>
</div>
</header><!-- .gridread-page-header -->
</div>

<div class='gridread-posts-content'>
    <?php if ( gridread_get_option('error_404_message') ) : ?>
    <p><?php echo wp_kses_post( force_balance_tags( gridread_get_option('error_404_message') ) ); ?></p>
    <?php else : ?>
    <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'gridread' ); ?></p>
    <?php endif; ?>

    <?php if ( !(gridread_get_option('hide_404_search')) ) { ?><?php get_search_form(); ?><?php } ?>
</div>

</div>
</div>
</div><!--/#gridread-posts-wrapper -->

<?php gridread_404_widgets(); ?>

</div>
</div>
</div><!-- /#gridread-main-wrapper -->

<?php get_footer(); ?>