<?php
/**
 * The template for displaying 404 pages (not found).
 *
 * @link https://codex.wordpress.org/Creating_an_Error_404_Page
 *
 * @package MF Theme
 */

get_header(); 
global $mf_options;
get_template_part( 'template-parts/page-headers');
$pagebgcolor = $mf_options['page-bg-color'];

$page_gl_titlebg = $mf_options['tr-default-pg-bg']['url'];
?>   
<div class="content-main">
  <div id="primary" class="site-content">
    <div id="content" role="main" style="background-color: <?php echo esc_attr($pagebgcolor); ?>">  
      <?php get_template_part( 'template-parts/index-title'); ?>  
  <!-- main -->
    <div class="container no-padding">
      <article  id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <div class="entry-content">
          <section class="c-content-boxes variant-two ">
            <div class="col-md-12 no-padding-left">
              <div class="col-md-12 mt10">
                <!-- .error-404 -->
				<section class="error-404 not-found">
                <?php if ($mf_options['not-found-type'] == '1') { ?>
                 <article class="text-center c-margin-t-60 c-margin-b-60" style="margin-top: 60px; margin-bottom: 200px;">
                    <h1 class="c-font-xl c-margin-b-30"><?php echo esc_html( $mf_options['not-found-text']);?></h1>
                    <h3 class="c-margin-b-30">
                      <?php echo esc_html( $mf_options['not-found-content']);?>
                    </h3>
                    <?php
                    $searchbox = $mf_options['search-on'];
                    if ($searchbox == '1') { ?>
                    <form method="post" class="form-inline" style="margin-top: 60px;">
                      <div class="input-group input-group-lg">
                        <?php get_search_form(); ?>
                     </form>
					 <?php }?>
                  </article>
                <?php }else { ?>
                 <article class="text-center c-margin-t-60 c-margin-b-60" style="margin-top: 60px; margin-bottom: 200px;">
					  <?php 
					   $post   = get_post( $mf_options['opt-select-pages'] );
					  echo $output =  apply_filters( 'the_content', $post->post_content );
					 
					  ?>
                   
                    <?php
                    $searchbox = $mf_options['search-on'];
                    if ($searchbox == '1') { ?>
                    <form method="post" class="form-inline"  style="margin-top: 40px;">
                      <div class="input-group input-group-lg">
                        <?php get_search_form(); ?>
                     </form>
                    <?php }?>
                  </article>
                <?php } ?>
                </section>
                <!-- .error-404 -->
              </div>
            </div>

          </section>
        </div>
        <!-- .entry-content -->

      </article>
      <!-- #post-## -->
    </div>
  </main>
  <!-- #main -->
</div>
<!-- #primary -->

<?php get_footer(); ?>