コード例 #1
0
ファイル: frontpage_cats.php プロジェクト: enetter/ecores
            $nbposts += 1;
            ?>
						<?php 
            if ($nbposts == 1) {
                ?>
							<li class="frontpage-cat-first">
								<div class="thumbnail">
									<a href="<?php 
                the_permalink();
                ?>
">
										<img src="<?php 
                bloginfo('template_directory');
                ?>
/scripts/timthumb.php?src=<?php 
                echo get_custom_thumbnail($post);
                ?>
&w=170&h=120&zc=1&q=100">
									</a>
									<div class="caption frontpage" rel="popover" data-content="<?php 
                echo ecs_short_excerpt(20) . '<br/>';
                ?>
<span class='label'><?php 
                the_time('j/m/Y');
                ?>
</span> 
											<span class='label'><?php 
                comments_number('Pas de commentaires', 'Un commentaire', '% commentaires');
                ?>
</span>" 
											data-original-title="<?php 
コード例 #2
0
ファイル: carousel.php プロジェクト: enetter/ecores
function ecs_carousel($ecs_query = '', $cols = 8)
{
    $my_query = new WP_Query($ecs_query);
    $colimg = 4;
    $coltxt = $cols - 4;
    ?>
<div id="top_carousel" class="carousel slide"> 

  <!-- Carousel items -->
  <div class="carousel-inner">
  	<?php 
    $first = true;
    while ($my_query->have_posts()) {
        $my_query->the_post();
        $cat = get_single_top_category(get_the_ID());
        ?>
	    <div class="item <?php 
        if ($first) {
            echo 'active';
            $first = false;
        }
        ?>
">
	    	<div class="row">
	    		<a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="Lien permanent vers <?php 
        the_title();
        ?>
">
	    	<div class="span<?php 
        echo $colimg;
        ?>
">
          	<img src="<?php 
        echo bloginfo('template_url');
        ?>
/scripts/timthumb.php?src=<?php 
        echo get_custom_thumbnail($post);
        ?>
&w=370&h=240&zc=1&q=100">
         </div>
	    	<div class="span<?php 
        echo $coltxt;
        ?>
">
	    		<h2><?php 
        the_title();
        ?>
</h2>
	    		<p><?php 
        echo ecs_short_excerpt(50);
        ?>
</p>
	    	</div>
	    	</a>
	    </div>
	  </div>
    <?php 
    }
    ?>
  </div>
	  <!-- Carousel nav -->
	  <?php 
    if ($my_query->post_count > 1) {
        ?>
		  <a class="carousel-control left" href="#top_carousel" data-slide="prev">&lsaquo;</a>
		  <a class="carousel-control right" href="#top_carousel" data-slide="next">&rsaquo;</a>
		<?php 
    }
    ?>

	</div>
<?php 
    wp_reset_postdata();
}