Example #1
0
// Check for content overrides
// Testimonials and Post-Quotes use testimonial format
if (get_post_type() == 'ac_testimonial' || get_post_type() == 'post' && get_post_format() == 'quote') {
    echo ac_testimonial_render($post->ID, true, $excerpt_length);
} else {
    ?>

		<?php 
    if (ac_has_post_thumbnail($post->ID)) {
        ?>
			<div class='image'>				
				<?php 
        echo $a_start;
        ?>
				<?php 
        echo ac_resize_image_for_grid(array('image_id' => ac_get_post_thumbnail_id($post->ID), 'columns' => $cols, 'ratio' => $image_aspect_ratio));
        ?>
				<?php 
        echo $a_end;
        ?>
			</div>
		<?php 
    }
    ?>

		<?php 
    if ($show_title || $show_excerpt) {
        ?>
		<div class='text'>
			<?php 
        if ($show_title) {
Example #2
0
                    break;
            }
        }
    } else {
        if (get_post_type($post) == 'attachment') {
            // For image use lightbox
            $img = ac_resize_image_for_columns(array('image_id' => $post->ID, 'columns' => 12, 'ratio' => ac_get_height_style_for_post($post->ID)));
            // Don't include the pretty photo data in the text link
            $a_start = '<a class="prettyphoto" href="' . esc_url($img['url']) . '" rel="prettyPhoto[rel-' . ac_get_prettyphoto_rel() . ']">';
        }
    }
}
// Image
if (ac_has_post_thumbnail($post->ID)) {
    $img_args = array('image_id' => ac_get_post_thumbnail_id($post->ID), 'columns' => $img_cols, 'ratio' => $img_height_style, 'full_width' => $full_width);
    $image = ac_resize_image_for_grid($img_args);
}
// Excerpt
if ($show_excerpt) {
    // Sanitise some values
    $excerpt_length = false;
    $excerpt = ac_get_excerpt($post, $excerpt_length, false, true);
}
// Get terms slugs for Isotope filtering
$terms = ' all ';
$post_terms = get_the_terms($post->ID, $post_category);
if (!empty($post_terms)) {
    foreach ($post_terms as $post_term) {
        $terms .= ' ' . $post_term->slug . ' ';
    }
}