File: /home/mirz4654/public_html/wp-content/themes/mira-yosomite/page-home.php
<?php get_header(); ?>
<!-- ============ Content =============== -->
<main class="main-content">
<div class="page-container">
<!-- Start Hero Area -->
<div class="section hero-area h-full-screen" data-parallax="scroll" data-position="top" data-image-src="<?php header_image(); ?>" data-natural-width="1400" data-natural-height="900">
</div>
<!-- End Hero Area -->
<?php
$home = get_page_by_path('home');
$args = array(
'name' => 'services',
'post_type' => 'page',
'post_status' => 'publish',
'numberposts' => 1
);
query_posts($args);
if (have_posts()) :
while (have_posts()) :
the_post();
?>
<!-- Start About US Area -->
<div class="section about-us-area pt-60 pb-50 t-center">
<div class="container">
<div class="row mb-40">
<div class="col-xs-12 col-sm-10 col-md-8 col-md-offset-2 col-sm-offset-1">
<h2 class="mb-20"><?php echo (get_post_custom_values('page-tagline', $home->ID) != '') ? get_post_custom_values('page-tagline', $home->ID)[0] : 'Mira and Associates' ?></h2>
<h5 class="mb-20 t-uppercase color-theme"><?php echo (get_post_custom_values('page-tagline', get_the_ID()) != '') ? get_post_custom_values('page-tagline', get_the_ID())[0] : 'WHAT WE CAN DO' ?></h5>
<p class="mb-20 color-mid">
<?php the_content(); ?>
</p>
</div>
</div>
<?php
$args = array(
'sort_column' => 'menu_order',
'sort_order' => 'ASC',
'child_of' => get_the_ID()
);
$posts_array = get_pages($args);
?>
<div class="row">
<?php
foreach ($posts_array as $services_child) :
?>
<div class="col-md-3 col-sm-6">
<figure class="service-box mb-10">
<img src="<?php echo myt_thumb($services_child->ID, 'thumbnail'); ?>" alt="" class="img-responsive">
<p class="pos-tb-center color-white font-18 t-uppercase">
<a href="<?php echo get_page_link($services_child->ID); ?>"><?php echo $services_child->post_title; ?></a>
</p>
</figure>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<!-- End About US Area -->
<?php
endwhile;
endif;
wp_reset_query();
$about = get_page_by_path('about-us');
$contact = get_page_by_path('contact-us');
?>
<!-- Start Two Cols Area -->
<div class="section two-cols-area bg-gray pt-60">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-push-6 t-xs-center t-md-right pb-60">
<img src="<?php echo myt_thumb($home->ID, 'medium'); ?>" alt="">
</div>
<div class="col-md-6 col-md-pull-6 col-sm-12 pt-20 pb-60">
<h3 class="t-uppercase mb-30 color-theme"><?php echo (get_post_custom_values('page-tagline', $home->ID) != '') ? get_post_custom_values('page-tagline', $home->ID)[0] : 'Mira and Associates' ?></h3>
<?php echo $home->post_content; ?>
<div class="pt-20">
<a href="<?php echo get_page_link($contact->ID); ?>" class="btn btn-xlg mr-20">Contact Us Now!</a>
</div>
</div>
</div>
</div>
</div>
<!-- End Two Cols Area -->
<!-- Start Why Choose Us Area -->
<div class="section features-area bg-gray ptb-60" id="features">
<div class="container">
<div class="row mb-30">
<div class="col-lg-7 col-md-8 col-sm-10 col-xs-12 col-xs-center t-center mb-40">
<h2 class="mb-20 font-24 t-uppercase">Why Choose Us</h2>
</div>
</div>
<div class="row">
<?php
$wcu = get_page_by_path('why-choose-us');
$args = array(
'sort_column' => 'menu_order',
'sort_order' => 'ASC',
'child_of' => $wcu->ID
);
$posts_array = get_pages($args);
foreach ($posts_array as $wcu_ch) :
?>
<div class="feature-single col-md-4 col-sm-6 col-xs-12 mb-40">
<i class="feature-icon <?php echo (get_post_custom_values('wcu-icon-name', $wcu_ch->ID) != '') ? get_post_custom_values('wcu-icon-name', $wcu_ch->ID)[0] : 'icon-desktop' ?>"></i>
<div class="feature-text">
<h6 class="t-uppercase mb-10"><?php echo $wcu_ch->post_title; ?></h6>
<p class="color-mid"><?php echo strip_tags($wcu_ch->post_content); ?></p>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<!-- End Why Choose Us Area -->
<!-- Start Portfolio Area -->
<?php $interior = get_page_by_path('interior'); ?>
<div class="section slider-area" data-parallax="scroll" data-position="top" data-image-src="<?php echo myt_thumb($interior->ID, 'full'); ?>" data-natural-width="1400" data-natural-height="900">
<div class="overlay"></div>
<div class="owl-carousel" data-loop="true" data-autoplay="true" data-autoplay-timeout="10000" data-smart-speed="800" data-nav-speed="false" data-dots="false" data-nav="true">
<?php
$args = array(
'sort_column' => 'menu_order',
'sort_order' => 'ASC',
'child_of' => $interior->ID
);
$posts_array = get_pages($args);
foreach ($posts_array as $int_ch) :
?>
<figure data-bg-img="<?php echo myt_thumb($int_ch->ID, 'full'); ?>" data-natural-width="1400" data-natural-height="900">
<div class="container">
<div class="col-sm-12 col-md-6 col-md-offset-6 h-full-screen">
<div class="pos-tb-center">
<h3 class="h1 mb-20 font-50"><a href="<?php echo get_page_link($int_ch->ID); ?>"><?php echo $int_ch->post_title; ?></a></h3>
<p class="mb-40 h4"><?php echo strip_tags($int_ch->post_excerpt); ?></p>
<a href="<?php echo get_page_link($int_ch->ID); ?>" class="btn btn-white btn-o btn-lg">View Portfolio <i class="fa fa-angle-right"></i></a>
</div>
</div>
</div>
</figure>
<?php
endforeach;
?>
</div>
</div>
<?php $portfolio = get_page_by_path('portfolio'); ?>
<div class="section portfolio-area ptb-60" id="portfolio">
<div class="container">
<div class="row mb-40">
<div class="col-lg-7 col-md-8 col-sm-10 col-xs-12 col-xs-center t-center">
<h2 class="mb-20 font-24 t-uppercase"><?php echo $portfolio->post_title; ?></h2>
<p class="color-mid"><?php echo strip_tags($portfolio->post_excerpt); ?></p>
</div>
</div>
<div class="row row-tb-10 row-rl-10">
<?php
$args = array(
'category_name' => 'portfolio',
'post_type' => 'portfolios',
'post_status' => 'publish',
'posts_per_page' => 6
);
query_posts($args);
if (have_posts()) :
while (have_posts()) :
the_post();
?>
<div class="col-md-4 col-sm-6">
<div class="work-inner">
<div class="work-overlay">
<h3 class="font-22"><?php the_title(); ?></h3>
<a href="<?php the_permalink(); ?>" class="work-link"><i class="fa fa-link"></i></a>
<a href="<?php echo myt_thumb(get_the_ID(), 'thumbnail'); ?>" class="img-lightbox"><i class="fa fa-search"></i></a>
</div>
<img src="<?php echo myt_thumb(get_the_ID(), 'thumbnail'); ?>" alt="">
</div>
</div>
<?php
endwhile;
endif;
wp_reset_query();
?>
</div>
<div class="t-center pt-40">
<a href="<?php echo get_page_link($portfolio->ID); ?>" class="btn btn-lg">View All <i class="fa fa-long-arrow-right ml-10"></i></a>
</div>
</div>
</div>
<!-- End Portfolio Area -->
<?php /* ?>
<?php $team = get_page_by_path('our-team'); ?>
<!-- Start Our Team Area -->
<div class="section our-team-area our-team-area-1 pt-60 pb-40 bg-gray">
<div class="container">
<div class="row mb-40">
<div class="col-lg-7 col-md-8 col-sm-10 col-xs-12 col-xs-center t-center">
<h2 class="mb-20 font-24 t-uppercase"><?php echo $team->post_title; ?></h2>
<p class="color-mid"><?php echo strip_tags($team->post_excerpt); ?></p>
</div>
</div>
<div class="row">
<?php
$args = array(
'sort_column' => 'menu_order',
'sort_order' => 'ASC',
'child_of' => $team->ID
);
$posts_array = get_pages($args);
foreach ($posts_array as $member) :
?>
<div class="col-sm-6 col-md-3">
<div class="team-member">
<div class="member-photo">
<a href="<?php echo get_page_link($member->ID); ?>">
<img src="<?php echo myt_thumb($member->ID, 'thumbnail'); ?>" alt="">
</a>
</div>
<div class="member-about text-center">
<h4><a href="<?php echo get_page_link($member->ID); ?>"><?php echo $member->post_title; ?></a></h4>
<p><?php echo (get_post_custom_values('page-tagline', $member->ID) != '') ? get_post_custom_values('page-tagline', $member->ID)[0] : '—' ?></p>
</div>
<!-- /.social-icons -->
</div>
<!-- /.team-member -->
</div>
<?php
endforeach;
?>
</div>
<!-- /.row -->
</div>
</div>
<!-- End Our Team Area -->
<?php */ ?>
</div>
</main>
<?php get_footer(); ?>