我正在運行一個wordpress,如果while語句並希望我的項目以列格式顯示。我目前使用960.gs
這是標準的960網格系統,並默認添加10px padding
到左,右,通過傳遞的alpha
類或omega
你就可以擺脫這些PHP計數器每增加一個第四個div
。
我該如何讓PHP執行每個第一個添加alpha和第四個歐米茄的聲明?
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="grid_4">
<?php $wp_query->is_home = false; ?>
<div class="entry">
<h3 style="margin-bottom:10px;"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
<?php //the_excerpt() ?>
</div>
</div>
<?php endwhile; endif; ?>