function home() { $post_count = 1; $teaser_count = 1; while (have_posts()) { #wp the_post(); #wp if (thesis_is_teaser($post_count)) { if ($teaser_count % 2 == 1) { $top = $post_count == 1 ? ' top' : ''; $open_box = "\t\t\t<div class=\"teasers_box{$top}\">\n\n"; $close_box = ''; $right = false; } else { $open_box = ''; $close_box = "\t\t\t</div>\n\n"; $right = true; } if ($open_box != '') { echo $open_box; thesis_hook_before_teasers_box($post_count); } thesis_teaser($classes, $post_count, $right); if ($close_box != '') { echo $close_box; thesis_hook_after_teasers_box($post_count); } $teaser_count++; } else { $classes = 'post_box'; if ($post_count == 1) { $classes .= ' top'; } thesis_post_box($classes, $post_count); } $post_count++; } if (($teaser_count - 1) % 2 == 1) { echo "\t\t\t</div>\n\n"; } }
function thesis_home_loop() { $post_count = 1; $teaser_count = 1; while (have_posts()) { the_post(); if (thesis_is_teaser($post_count)) { if ($teaser_count % 2 == 1) { $top = $post_count == 1 ? ' top' : ''; $open_box = ' <div class="teasers_box' . $top . '">' . "\n\n"; $close_box = ''; $right = false; } else { $open_box = ''; $close_box = ' </div>' . "\n\n"; $right = true; } if ($open_box != '') { echo $open_box; thesis_hook_before_teasers_box($post_count); } thesis_teaser($classes, $post_count, $right); if ($close_box != '') { echo $close_box; thesis_hook_after_teasers_box($post_count); } $teaser_count++; } else { $classes = 'post_box'; if ($post_count == 1) { $classes .= ' top'; } thesis_post_box($classes, $post_count); } $post_count++; } if (($teaser_count - 1) % 2 == 1) { echo ' </div>' . "\n\n"; } }