<?php
/*
Template Name: Frontpage 4
*/
?>

<?php get_header() ?>


	<div id="header-bottom">

		<div id="text1"><span><?php echo of_get_option('welcome', 'Welcome to WildCommunity' ); ?></span></div>
		<div id="text2"><span><?php echo of_get_option('members', '75.000 members and counting...' ); ?></span></div>

	</div><!-- #header-bottom -->

	</div><!-- #header-container -->

	<div id="frontpage-info">
	<div id="frontpage-info-center">
	<div id="frontpage-info-icon"></div>
<?php echo of_get_option('info', 'BuddyPress lets users register on your site and start creating profiles, posting messages, making connections, creating and interacting in groups and much more. A social network in a box, BuddyPress lets you build a social network for your company, school, sports team or niche community.' ); ?>
	</div>
	</div><!-- #frontpage-info -->

		<?php do_action( 'bp_after_header' ) ?>
		<?php do_action( 'bp_before_container' ) ?>

<div id="container">

	<div id="content">


<div id="front-boxes">
<div id="front-boxes-wider">

<div class="front-box">
   <div><a href="<?php echo of_get_option('2box-link', 'groups' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/_inc/images/box-groups.png" alt="<?php echo of_get_option('2box-title', 'Our Groups' ); ?>" /></a></div>
    <div class="front-box-title"><a href="<?php echo of_get_option('2box-link', 'groups' ); ?>"><?php echo of_get_option('2box-title', 'Our Groups' ); ?></a></div>
</div><!--front-box ends-->

<div class="front-box">
    <div><a href="<?php echo of_get_option('4box-link', 'members' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/_inc/images/box-members.png" alt="<?php echo of_get_option('4box-title', 'Our Members' ); ?>" /></a></div>
    <div class="front-box-title"><a href="<?php echo of_get_option('4box-link', 'members' ); ?>"><?php echo of_get_option('4box-title', 'Our Members' ); ?></a></div>
</div><!--front-box ends-->

<div class="front-box">
    <div><a href="<?php echo of_get_option('1box-link', 'forums' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/_inc/images/box-forum.png" alt="<?php echo of_get_option('1box-title', 'Our Forums' ); ?>" /></a></div>
    <div class="front-box-title"><a href="<?php echo of_get_option('1box-link', 'forums' ); ?>"><?php echo of_get_option('1box-title', 'Our Forums' ); ?></a></div>				
</div><!--front-box ends-->

<div class="front-box">
    <div><a href="<?php echo of_get_option('3box-link', 'about-us' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/_inc/images/box-info.png" alt="<?php echo of_get_option('3box-title', 'How it works?' ); ?>" /></a></div>
    <div class="front-box-title"><a href="<?php echo of_get_option('3box-link', 'about-us' ); ?>"><?php echo of_get_option('3box-title', 'How it works?' ); ?></a></div>
</div><!--front-box ends-->

<div class="clear"> </div>
</div><!-- front-boxes-wider2 ends-->
</div><!-- front-boxes2 ends-->









<div class="frontpage-bottom">


<div id="tabs-container">
<div class="blog-thumbs-view">
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('posts_per_page=6'.'&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
    
	<div class="blog-thumbs-view-entry">
          	      <div class="blog-thumb">
		<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
		<div class="blog-thumb-category"><?php the_category(', ') ?></div>
		<div class="blog-thumb-date"><?php the_date(' j F Y / G:i '); ?></div>
	</div>
       	      <div class="blog-thumb-title"><a href="<?php the_permalink(); ?>"><?php $thetitle = $post->post_title; $getlength = strlen($thetitle); $thelength = 57; echo mb_substr($thetitle, 0, $thelength, 'UTF-8'); if ($getlength > $thelength) echo "..."; ?></a></div>
	<div class="blog-thumb-desc"><?php echo substr(get_the_excerpt(), 0,100); ?> ...</div>
	</div>


<?php endwhile; // end of loop
 ?>

<?php $wp_query = null; $wp_query = $temp;?>
</div>
</div> <!-- tabs-container -->

<div id="front-small-sidebar">
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar-middle-top')) : ?><?php endif; ?>
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar-middle')) : ?><?php endif; ?>
</div><!-- front-small-sidebar -->

</div><!-- .frontpage-bottom -->

</div><!-- #content -->

<div id="sidebar">

<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar-frontpage')) : ?><?php endif; ?>

</div><!-- #sidebar -->

</div> <!-- #container -->
<?php get_footer() ?>
