
<?php 
$blog_title_breadcrumb = get_theme_mod( 'blog_title_breadcrumb', __( 'Blog', 'edify' ) );
$blog_title = get_theme_mod( 'blog_title', __( 'Blog Page', 'edify' ) );



$contact_title_breadcrumb = get_theme_mod( 'contact_title_breadcrumb', __( 'Contact', 'edify' ) );
$contact_title = get_theme_mod( 'contact_title', __( 'Contact Page', 'edify' ) );

$search_title = get_search_query() ;
?>

   <div class="page-header">
      <div class="container" >
            <div class="row justify-content-center">
               <div class="col-xl-10 col-lg-10 col-md-12">
                  <div class="page-banner-content text-center">
                        <ul class="list-inline breadcrumb-nav">
                           <li class="list-inline-item">
                              <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html__('Home','edify');?></a>
                           </li>
                           <li class="list-inline-item"><?php echo esc_html('/');?></li>

                           <li class="list-inline-item">
                           <?php 
                            if(!empty($blog_title_breadcrumb )) {
                                echo esc_html($blog_title_breadcrumb );
                              } 
                              elseif(is_search()){
                                echo esc_html($search_title);
                             }
                             elseif(is_archive()){
                                the_archive_title();
                             }
                             elseif(( is_404() )){
                                printf( esc_html__( '404 not found', 'edify' ));
                             }
                           
                             elseif(is_single()){
                                the_title(); 
                             }
                              else{
                                printf( esc_html__( 'Blog', 'edify' ) );
                             }
                                 ?>
                           </li>
                        </ul>
                 
                     <h2 class="banner-title ">
                         <?php if(!empty($blog_title )) {
                                echo esc_html($blog_title );
                           }
                            elseif(is_search()){
                                echo esc_html($search_title);
                             }
                             elseif(is_archive()){
                                the_archive_title();
                             }
                             elseif(( is_404() )){
                                printf( esc_html__( '404 not found', 'edify' ), '<span>' );
                             }
                           
                            elseif(is_single()){
                                the_title(); 
                             }
                              else{
                                printf( esc_html__( 'Blog', 'edify' ) );
                             }
                             
                              ?>
                     </h2>
                    
                  </div>
               </div>
            </div>
      </div>
   </div>  
  