<?php 

/**

* Template Name: Inner Pages

* 

* @package WP_Corporate

*/



get_header();



 $parents = get_post_ancestors( $post->ID ); $parentName=apply_filters( "the_title", get_the_title( end ( $parents ) ) ); $parentUrl=apply_filters( "page_link", get_page_link( end ( $parents ) ) ); $pageT=get_the_title($post->ID); ?>
<!-- Font Awesome -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">



<!--header class="page-header">

	<?php the_title( '<h1 class="page-title">', '</h1>' ); ?>



</header><!-- .page-header -->
<div id="coverBlock">
				

<div class="ed-container">
	
	<h1><?php the_title();?></h1>
		


  

<p class="newAmps-crumb"><a href="<?php echo get_site_url();?>">Home</a><span class="fa fa-chevron-right"></span><?php if(!in_array(get_the_title($post->ID),['Industries','Contact Us'])){ echo '<a href="#">'.$parentName.'</a><span class="fa fa-chevron-right"></span>'; } ?><a href="#"><?php the_title();?></a></p>

</div>

    </div>



<div class="ed-container blog alternate-image">

			<div id="primary" class="content-area">

				<main id="main" class="site-main" role="main">

<?php
					// setup the cateogory ID
					$cat_id= $post->post_content; $pindex=0;
					// create a custom wordpress query
					query_posts("cat=$cat_id&posts_per_page=100");
					// start the wordpress loop!
					if (have_posts()) : while (have_posts()) : the_post(); ?>

						<?php // create our link now that the post is setup

						if($pindex%2==0){?>
<article id="post-<?php the_ID(); ?>" class="post-<?php the_ID(); ?> post type-post status-publish format-standard has-post-thumbnail hentry category-blog">
   <header class="entry-header" style="
      margin-top: 30px;
      ">
      <h2 class="entry-title"><?php the_title(); ?></h2>
   </header>
   <!-- .entry-header -->
   <div class="entry-content">
      <figure>
         <img src="<?php the_post_thumbnail_url('wp-corporate-fullwidth-image'); ?>" alt="<?php the_title(); ?>">
      </figure>
      <div class="content-text">
		 <?php if($pageT=='Career@newAmps'||$pageT=='Blogs'){
         the_excerpt(); ?>
		 <a class="arhive-readmore ed-bttn" href="<?php the_permalink(); ?>">Read More</a>
<?php }else{  the_content(); } ?>
      </div>
   </div>
   <!-- .entry-content -->
   <!-- .entry-footer -->	
</article>
						<?php }else{ ?>
						<article id="post-<?php the_ID(); ?>" class="post-<?php the_ID(); ?> post type-post status-publish format-standard has-post-thumbnail hentry category-blog">
   <header class="entry-header" style="
      margin-top: 30px;
      ">
      <h2 class="entry-title"><?php the_title(); ?></h2>
   </header>
   <!-- .entry-header -->
   <div class="entry-content">
      <figure>
         <img src="<?php the_post_thumbnail_url('wp-corporate-fullwidth-image'); ?>" alt="<?php the_title(); ?>">
      </figure>
      <div class="content-text">
         <?php the_content(); ?>
      </div>
   </div>
   <!-- .entry-content -->
   <!-- .entry-footer -->	
</article>
<!-- #post-## -->
					 <?php } $pindex++; endwhile; endif; // done our wordpress loop. Will start again for each category ?>
                                                        
						

				</main><!-- #main -->

			

			</div><!-- #primary -->

	

</div>

<?php get_footer();

