Example #1
0
function wptouch_get_post_classes()
{
    global $post;
    $post_classes = array('post', 'section');
    // Add the post ID as a class
    if (isset($post->ID)) {
        $post_classes[] = 'post-' . $post->ID;
    }
    // Add the post title
    if (isset($post->post_name)) {
        $post_classes[] = 'post-name-' . $post->post_name;
    }
    // Add the post parent
    if (isset($post->post_parent) && $post->post_parent) {
        $post_classes[] = 'post-parent-' . $post->post_parent;
    }
    // Add the post parent
    if (isset($post->post_author) && $post->post_author) {
        $post_classes[] = 'post-author-' . $post->post_author;
    }
    if (is_single()) {
        $post_classes[] = 'single';
    } else {
        $post_classes[] = 'not-single';
    }
    if (is_page()) {
        $post_classes[] = 'page';
    } else {
        $post_classes[] = 'not-page';
    }
    if (wptouch_has_post_thumbnail()) {
        $post_classes[] = 'has-thumbnail';
    } else {
        $post_classes[] = 'no-thumbnail';
    }
    return apply_filters('wptouch_post_classes', $post_classes);
}
    ?>
</span>
		</div>
	<?php 
}
?>
	<?php 
if (bauhaus_should_show_thumbnail() && wptouch_has_post_thumbnail()) {
    ?>
		<img src="<?php 
    wptouch_the_post_thumbnail('thumbnail');
    ?>
" alt="thumbnail" class="post-thumbnail wp-post-image" />
	<?php 
} else {
    if (bauhaus_should_show_thumbnail() && !wptouch_has_post_thumbnail()) {
        ?>
		<div class="date-circle">
			<span class="month"><?php 
        the_time('M');
        ?>
</span>
			<span class="day"><?php 
        the_time('j');
        ?>
</span>
		</div>
	<?php 
    }
}
?>
Example #3
0
            $query->the_post();
            ?>

				<li class="<?php 
            wptouch_post_classes();
            ?>
">
		<?php 
            if (classic_should_show_thumbnail() && wptouch_has_post_thumbnail()) {
                ?>
			<img src="<?php 
                wptouch_the_post_thumbnail('thumbnail');
                ?>
" alt="thumbnail" class="post-thumbnail wp-post-image" />
		<?php 
            } elseif (classic_should_show_thumbnail() && !wptouch_has_post_thumbnail()) {
                ?>
			<span class="placeholder"><!-- styled in css --></span>
		<?php 
            }
            ?>
					<p class="date"><?php 
            wptouch_the_time();
            ?>
</p>
					<a href="<?php 
            wptouch_the_permalink();
            ?>
"><?php 
            the_title();
            ?>