<?php
/**
 * 
 * Template Name: Index Annonces
 */

get_header(); ?>

<div class="row">
			<!-- Wide Column -->
			<div class="twelve columns">
	    <h1>Annonces par catégories</h1>
       <ul class="cat-annonces"> 
<?php wp_list_categories('include=9,'.implode(',',get_term_children(9, 'category')).'&show_count=1&title_li='); ?>
</ul>
<h1>Annonces récentes </h1>
<?php
$the_query = new WP_Query('cat=9&showposts=10');
while ($the_query->have_posts()) : $the_query->the_post();
 		// Votre boucle 
?>
		


			<div class="home_default_img">
				 <?php 
if (has_post_thumbnail()) { ?>
<?php $thumb = get_post_thumbnail_id(); $img_url = wp_get_attachment_url( $thumb,'full' ); $image = sp_resize( $img_url, 160, 160, true ); ?>
<a href=" <?php the_permalink() ?>" title="<?php the_title(); ?>"><img  src="<?php echo $image ?>" border="0"/></a>  
<?php  } else { } ?>
				</div>
                <div class="post_description">
                <h2><a href=" <?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
				<small class="time-icon"> <?php the_time(__('j F, Y', 'wpthematic')) ?> <!-- by <?php the_author() ?> --></small></br>
				<?php echo excerpt(80);?>
				</div>

            
            

				

			<div class="clear"></div>
            <?php  // comments_template(); ?>
            
           
		

	<?php endwhile; ?>

   

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

 
 
   <div class="clear"></div>
<?php get_footer(); ?>