$thb_page_id = thb_get_page_ID();
thb_post_query();
?>

<?php 
if (have_posts()) {
    $i = 1;
    while (have_posts()) {
        the_post();
        ?>
	<?php 
        thb_post_before();
        ?>
	<?php 
        $post_id = get_the_ID();
        $post_classes = thb_get_post_classes($i, array('item list'), 2);
        $post_classes[] = 'classic';
        ?>

	<div id="post-<?php 
        echo $post_id;
        ?>
" <?php 
        post_class($post_classes);
        ?>
>
		<?php 
        thb_post_start();
        ?>
		<?php 
        get_template_part('loop/formats/classic-' . thb_get_post_format());
Example #2
0
	<?php 
thb_works_query();
if (have_posts()) {
    $i = 1;
    while (have_posts()) {
        the_post();
        ?>

		<?php 
        global $post;
        $work_id = get_the_ID();
        $work_featured_image = thb_get_featured_image($work_id, $work_image_size);
        $work_categories = wp_get_object_terms($work_id, 'portfolio_categories');
        $itemclass = $cats = array();
        $itemclass = thb_get_post_classes($i, array(''), $num_cols);
        if (empty($work_featured_image)) {
            $itemclass[] = 'wout-featured-image';
        }
        foreach ($work_categories as $cat) {
            $itemclass[] = $cat->slug;
            $cats[] = $cat->name;
        }
        ?>
		<?php 
        thb_post_before();
        ?>

		<li class="item <?php 
        echo implode(" ", $itemclass);
        ?>