<?php 
		get_header(); 

		global $parentPost;

		$WidgetArea=new TLThemeWidgetArea();

		$widgetAreaData=$WidgetArea->getWidgetAreaByPost($parentPost->post,true,true);
		$class=$WidgetArea->getWidgetAreaCSSClass($widgetAreaData);

        $home_url = home_url();
        $category = get_the_category($parentPost->post->ID);
        if($category[0]->slug == 'articles'){
            $category_link = get_permalink( get_page_by_path( '/article-categories/' ) );
        }elseif($category[0]->slug == 'blog'){
            $category_link = get_permalink( get_page_by_path( '/blog-categories/' ) );
        }
        $tags = wp_get_post_tags($post->ID);

?>
		<div class="page">
<?php
		if(TLThemeOption::getGlobalOption($parentPost->post,'header_visible')==1)
		{
?>
			<div class="page-header">
                <p><a href="<?php echo $home_url; ?>">Home</a> > <a href="<?php echo $category_link; ?>"><?php echo $category[0]->name; ?></a>  <?php if(!empty($tags)) : ?> > <a href="<?php echo get_tag_link($tags[0]->term_id); ?>"><?php echo $tags[0]->name; ?></a> <?php endif; ?>> <?php echo $parentPost->post->post_title; ?></p>
			</div>
<?php
		}
?>
			<div class="page-content clear-fix <?php echo $class; ?>">
<?php
		if($widgetAreaData['location']==1)
		{
?>
				<div class="column-left"><?php $WidgetArea->create($widgetAreaData); ?></div>
				<div class="column-right"><?php get_template_part('single','content'); ?></div>
<?php
		}
		elseif($widgetAreaData['location']==2)
		{
?>
				<div class="column-left"><?php get_template_part('single','content'); ?></div>
				<div class="column-right"><?php $WidgetArea->create($widgetAreaData); ?></div>		
<?php
		}
		else get_template_part('single','content')
?>
			</div>

		</div>
<?php 
		get_footer(); 
?>