<?php
/*
Template name: My front page
*/
?>


<?php get_header(); ?>

<div id="container">
<div id="left-div">
<div id="left-inside">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post-wrapper <?php if($fullwidth) echo (' no_sidebar');?>">
<?php get_template_part('includes/buttons'); ?>

<?php if (get_option('artsee_page_thumbnails') == 'on') { ?>

<?php $thumb = '';

$width = 573;
$height = 187;
$classtext = '';
$titletext = get_the_title();

$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>

<?php if($thumb <> '') { ?>
<div class="thumbnail-div">
<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
</div>
<?php }; ?>

<?php }; ?>


<div style="clear: both;"></div>

<?php the_content(); ?>
<div id="et_pt_blog">

<?php query_posts('cat=3,4,5,8,10&showposts=3'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<div class="et_pt_blogentry clearfix">
<h2 class="et_pt_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

<p class="et_pt_blogmeta"><?php esc_html_e('Posted','ArtSee'); ?> <?php esc_html_e('by','ArtSee'); ?> <?php the_author_posts_link(); ?> <?php esc_html_e('on','ArtSee'); ?> <?php the_time(esc_attr(get_option('artsee_date_format'))) ?> <?php esc_html_e('in','ArtSee'); ?> <?php the_category(', ') ?> | <?php comments_popup_link(esc_html__('0 comments','ArtSee'), esc_html__('1 comment','ArtSee'), '% '.esc_html__('comments','ArtSee')); ?></p>

<?php $thumb = '';
$width = 184;
$height = 184;
$classtext = '';
$titletext = get_the_title();

$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>

<?php if ( $thumb <> '' && !$et_ptemplate_showthumb ) { ?>
<div class="et_pt_thumb alignleft">
<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
<a href="<?php the_permalink(); ?>"><span class="overlay"></span></a>
</div> <!-- end .thumb -->
<?php }; ?>

<?php if (!$et_ptemplate_blogstyle) { ?>
<p><?php truncate_post(550);?></p>
<a href="<?php the_permalink(); ?>" class="readmore"><span><?php esc_html_e('read more','ArtSee'); ?></span></a>
<?php } else { ?>
<?php
global $more;
$more = 0;
?>
<?php the_content(); ?>
<?php } ?>
</div> <!-- end .et_pt_blogentry -->

<?php endwhile; ?>
<div class="navigation">
<h3>More posts here</h3>
<!-- Pagination -->
<?php if(function_exists('pagenavi')) { pagenavi(); } ?>
</div>
<?php else : ?>
<?php get_template_part('includes/no-results'); ?>
<?php endif; wp_reset_query(); ?>

</div> <!-- end #et_pt_blog -->

<div style="clear: both;"></div>

<?php wp_link_pages(array('before' => '<p><strong>'.esc_html__('Pages','ArtSee').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>


<?php if (get_option('artsee_show_pagescomments') == 'on') { ?>
<!--Begin Comments Template-->
<div class="recentposts">
<?php comments_template('', true); ?>
</div>
<!--End Comments Template-->
<?php }; ?>
</div> <!-- end .post-wrapper -->
<?php endwhile; endif; ?>
</div> <!-- end #left-inside -->
</div> <!-- end #left-div -->

<!--Begin Sidebar-->
<?php if (!$fullwidth) get_sidebar(); ?>
<!--End Sidebar-->
</div> <!-- end #container -->

<div style="clear: both;"></div>
<!--Begin Footer-->
<?php get_footer(); ?>
<!--End Footer-->
</body>
</html>