<?php
define('TMPL',get_bloginfo('template_url').'/');
define('HOME_URL',home_url().'/');
define('SITE_TITLE',get_bloginfo('name'));


 $primarycolor = swap_get_option('primary_color', '#8a8e75');
 $secondarycolor = swap_get_option('secondary_color', '#d5c7ad');
 $thirdcolor = swap_get_option('third_color', '#b6c6b7');
 $backgroundcolor = swap_get_option('page_color', '#ffffff');
 
  $body_font = swap_get_option('body', '{}');
  $body_font = json_decode($body_font, true);

if (!empty($body_font)):
       
 foreach ($body_font as $body_font => $body_font_style):
     
 if($body_font=='font-family') $fontfamily = esc_attr($body_font_style);

if($body_font=='font-size')$fontsize = esc_attr($body_font_style);
if($body_font=='line-height')$lineheight = esc_attr($body_font_style);
if($body_font=='font-weight')$fontweight = esc_attr($body_font_style);


            
      endforeach; 
   
 endif; 
 if(!$fontfamily)   $fontfamily = (string) 'DM Sans';

    if(!$fontsize)  $fontsize = '16';
    if(!$lineheight)   $lineheight = '24';
    /* if(!$fontweight)   $fontweight = '400'; */
 
  
   $footerbgcolor = swap_get_option('footer_main_bg', '#fff');
$footertextcolor = swap_get_option('footer_main_text_color', '#222');
$footerlinkscolor = swap_get_option('footer_main_links_action_color', '#222');


?>
<!doctype html>
<html lang="en"<?php language_attributes(); ?>>

<head>

    <!--========= Required meta tags =========-->
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	
	  	<?php
$image_url = "";
 if(is_singular() || is_single() || is_page() ) { 

  $title             = strip_tags( get_the_title() );
$permalink         = get_permalink();
 $excerpt           = get_the_excerpt();
$content           = get_the_content();

if ( $excerpt != "" )
{
    $excerpt = strip_tags( trim( preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $content ) ) );
    
        $excerpt = substr( $excerpt, 100 );
}

if ( has_post_thumbnail()  ) {
    $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'medium' );
    $image_url = esc_attr( $thumbnail[0] );
 
}

 }else {
     

        $image_url =  swap_get_option('fav_icon', TMPL . 'aassets/images/logoskk.webp');
    


}


  $fav = swap_get_option('fav_icon', TMPL . 'assets/images/logoskk.webp');




               
?> 

    <title>Psychology - Therapy & Counseling </title>

    <link rel="shortcut icon" href="<?php echo $fav; ?>" / type="images/x-icon">

    <!-- css include -->
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/fontawesome.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/animate.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/swiper.min.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/odometer.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/mousecursor.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/nice-select.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/custom-fonts.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/magnific-popup.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/jquery-ui.css">
    <link rel="stylesheet" href="<?php echo TMPL;?>assets/css/main.css">
	
	<style>

	    
	    :root {
	        
	         --color-backgound: <?php echo $backgroundcolor; ?>;
	     
	        
    --color-primary: <?php echo $primarycolor; ?>;

    --color-secondary: <?php echo $secondarycolor; ?>;
    
        --color-primary-75: <?php echo $primarycolor.'bf'; ?>;

    --color-secondary-75: <?php echo $secondarycolor.'bf'; ?>;
    
       --color-primary-50: <?php echo $primarycolor.'80'; ?>;

    --color-secondary-50: <?php echo $secondarycolor.'80'; ?>;
       --color-primary-25: <?php echo $primarycolor.'40'; ?>;

    --color-secondary-25: <?php echo $secondarycolor.'40'; ?>;
    
    
    --color-footerbg: <?php echo $footerbgcolor; ?>;
    --color-footertextcolor:<?php echo $footertextcolor; ?>;
	--color-footerlinkscolor:<?php echo $footerlinkscolor; ?>;
    
    
    
    --font-body: "<?php echo $fontfamily; ?>",'Plus Jakarta Sans, sans-serif';
--font-heading: "<?php echo $fontfamily; ?>",'JazminAlt';
    --cnvs-font-size-body: <?php echo $fontsize; ?>px;
--bs-body-line-height: <?php echo $lineheight; ?>px;
--bs-body-font-weight: <?php echo $fontweight; ?>;
}

	</style>
	<?php   wp_head(); ?>
	 	<?php
	 	$header_script = swap_get_option('header_script', '');
	 	echo $header_script;
	 	?>
</head>

<body class="personal_therapist">

<!-- backtotop-start -->
<div class="xb-backtotop">
    <a href="#" class="scroll">
        <i class="far fa-arrow-up"></i>
    </a>
</div>
<!-- backtotop-end -->


<!-- <div id="preloader">
    <div id="loader" class="loader">
        <div class="loader-container">
            <div class="loader-icon logosize2"><img src="assets/images/logoskk.webp" alt=""></div>
        </div>
    </div>              
</div> -->
 

<div class="body_wrap o-clip">
      
  <p class="hero-top-content text-center">
        Guiding you through stress, trauma, anxiety, and relationship growth: <a href="#">Suhaib Kutty</a>
    </p>  
	

	<header id="xb-header-area" class="header-area header-style header-transparent"> 
        <div class="xb-header stricky original">
            <div class="container-fluid p-0">
                <div class="header__wrap ul_li_between glass">
                    <div class="xb-header-logo">
					<?php
	    $logo = swap_get_option('logo', TMPL . 'assets/images/logoskk.webp');
    if (is_int($logo)) $logo = swap_get_image_url($logo);
if (empty($logo)) $logo = TMPL . 'assets/images/logoskk.webp';
	
	if($logo){ ?>
                        <a href="<?php echo HOME_URL; ?>" class="logo1">
                            <img class="logosize" src="<?php echo $logo; ?>" alt="<?php echo SITE_TITLE;?>">
                            <img class="logosize" src="<?php echo $logo; ?>" alt="<?php echo SITE_TITLE;?>">
                        </a>
						<?php } ?> 
                    </div>
                    <div class="main-menu__wrap  navbar navbar-expand-xl p-0">
                        <nav class="main-menu collapse navbar-collapse">
                            <ul>
							<?php 
                               
    $locations = get_nav_menu_locations();
    $object = wp_get_nav_menu_object( $locations['primary'] ); 
    $menu_items = wp_get_nav_menu_items($object->term_id, array( 'order' => 'DESC' ));
              
         //     $menu_items=wp_get_nav_menu_items('Main Menu');
$pageURL = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];

 

 

$menu_items = buildTree($menu_items);





    foreach( $menu_items as $item ){
        create_menu($item,$pageURL);
    }
    ?>
                                
                            </ul>
                        </nav>
                    </div>
                    <div class="header-bar-mobile side-menu d-xl-none">
                        <a class="xb-nav-mobile" href="javascript:void(0);">
                            <i class="far fa-bars"></i>
                        </a>
                    </div>
                    <div class="header-btn">
                        <a href="<?php echo esc_url( home_url( '/contact/' ) ); ?>" class="thm-btn">
                            <span>Contact Us</span>
                        </a>
                    </div>
                </div>
                <div class="xb-header-wrap">
                    <div class="xb-header-menu">
                        <div class="xb-header-menu-scroll" style="
    background: var(--color-secondary);">
                            <div class="xb-menu-close xb-hide-xl xb-close"></div>
                            <div class="xb-logo-mobile xb-hide-xl">
							<?php
	    $logo = swap_get_option('logo', TMPL . 'assets/images/logoskk.webp');
    if (is_int($logo)) $logo = swap_get_image_url($logo);
if (empty($logo)) $logo = TMPL . 'assets/images/logoskk.webp';
	
	if($logo){ ?>
							
                            <a href="<?php echo HOME_URL; ?>" rel="home">
							<img class="logosize" src="<?php echo $logo; ?>" alt="<?php echo SITE_TITLE;?>"></a>
							<?php } ?> 
							</div>
                            
                            <nav class="xb-header-nav">
                                <ul class="xb-menu-primary clearfix">
                                      <?php 
                               
    $locations = get_nav_menu_locations();
    $object = wp_get_nav_menu_object( $locations['primary'] ); 
    $menu_items = wp_get_nav_menu_items($object->term_id, array( 'order' => 'DESC' ));
              
         //     $menu_items=wp_get_nav_menu_items('Main Menu');
$pageURL = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];

 

 

$menu_items = buildTree($menu_items);





    foreach( $menu_items as $item ){
        create_menu($item,$pageURL);
    }
    ?>
                                </ul>
                            </nav>
                        </div>
                    </div>
                    <div class="xb-header-menu-backdrop"></div>
                </div>
            </div>
        </div><div class="xb-header stricky stricked-menu">
            <div class="container-fluid p-0">
              
                <div class="xb-header-wrap">
                    <div class="xb-header-menu">
                        <div class="xb-header-menu-scroll">
                            <div class="xb-menu-close xb-hide-xl xb-close"></div>
                            <div class="xb-logo-mobile xb-hide-xl">
							<?php
	    $logo = swap_get_option('logo', TMPL . 'assets/images/logoskk.webp');
    if (is_int($logo)) $logo = swap_get_image_url($logo);
if (empty($logo)) $logo = TMPL . 'assets/images/logoskk.webp';
	
	if($logo){ ?>
                            <a href="<?php echo HOME_URL; ?>" rel="home"><img class="logosize" src="<?php echo $logo; ?>" alt="<?php echo SITE_TITLE;?>"></a>
							<?php } ?> 
							</div>
                            
                            <nav class="xb-header-nav">
                                <ul class="xb-menu-primary clearfix">
                                    <?php 
                               
    $locations = get_nav_menu_locations();
    $object = wp_get_nav_menu_object( $locations['primary'] ); 
    $menu_items = wp_get_nav_menu_items($object->term_id, array( 'order' => 'DESC' ));
              
         //     $menu_items=wp_get_nav_menu_items('Main Menu');
$pageURL = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];

 

 

$menu_items = buildTree($menu_items);





    foreach( $menu_items as $item ){
        create_menu($item,$pageURL);
    }
    ?>
                                </ul>
                            </nav>
                        </div>
                    </div>
                    <div class="xb-header-menu-backdrop"></div>
                </div>
            </div>
        </div>
    </header>
    <!-- header end --> 
	
	
	<?php
if (
    !is_front_page() &&
    !(is_page('contact-us')) 
) {

  ?>
  <?php
    $id = get_the_ID();

    $title_bg_image = get_post_meta($id, 'title_bg_image', true);
    $title_bg_image = swap_get_image_url($title_bg_image);
    if (empty($title_bg_image) || !(is_singular())) $title_bg_image = TMPL . 'assets/img/breadcumbs3.webp';

  ?>  
  <section class="page-title" style="background-image: url(<?php echo get_bloginfo('template_url'); ?>/assets/images/psyimg.jpg);background-size: cover;background-repeat: no-repeat;">
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-lg-10">
                        <div class="page-title-content text-center wow fadeIn" data-wow-duration="600ms">
                            <!--  <h2 class="breadcrumb-title">Mindful Care Through Music</h2> --> 
                              <?php if (is_home()) : ?>
                    <h1 class="breadcrumb-title"><?php single_post_title(); ?></h1>
                <?php elseif (is_page()) : ?>
                    <?php the_title('<h1>', '</h1>'); ?>
                <?php elseif (is_archive()) : 
                    if (is_category() || is_tag() || is_tax()) {
                        $term = $wp_query->get_queried_object();
                        if ((is_taxonomy_hierarchical($term->taxonomy) && $term->parent) && $parents = breadcrumb_get_term_parents($term->parent, $term->taxonomy)) {
                            $item = array_merge($item, $parents);
                        }
                    ?>
                       <h1><?php echo $term->name; ?></h1>
                    <?php 
                    } else if (function_exists('is_post_type_archive') && is_post_type_archive()) {
                        $post_type_object = get_post_type_object(get_query_var('post_type'));
                    ?>
                        <h1><?php echo $post_type_object->labels->name; ?></h1>
                    <?php } ?>
                <?php else : ?>
						<h1 class="bread-crumbclor"><?php the_title('<h1 >', '</h1>'); ?></h1>
							<?php endif; ?>
                        </div>
						<nav aria-label="breadcrumb">
						<ol class="breadcrumb mt-1 bread-crumbclor">
							<?php echo the_breadcrumb(); ?>   
						</ol>
					</nav>
                    </div>
                </div>
            </div>
            
        </section>
		<?php } ?>
	
	 