Using the category.php template file and I can get all other information about a post except the excerpt or the content. Here's the code I'm using:
$cat = get_queried_object();
$posts = get_posts(array('posts_per_page' => 15, 'offset' => 0, 'category' => $cat->term_id));
foreach($posts as $post)
{
$postID = $post->ID;
$title = get_the_title($postID);
$link = get_permalink($postID);
$date = get_the_date('M. j, Y', $postID);
$authors = coauthors_posts_links(null, null, null, null, false);
$excerpt = get_the_excerpt($postID);
$thumb = get_the_post_thumbnail($post, array('class' => 'front-page-tease-sm'));
echo '<div class="category-post">';
// Left box - date
printf('<div class="date">%1$s</div>', esc_attr($date));
// Middle box flex - headline, author, and excerpt
echo '<div class="category-post-info">';
printf('<a class="category-headline" href="%1$s">%2$s</a>', esc_attr($link), esc_html($title));
printf('<div class="category-author">By %1$s</div>', $authors);
printf('<div class="category-tease">%1$s</div>', $excerpt);
echo '</div>';
// Right box - thumbnail
printf($thumb);
echo '</div>';
}
This code does exactly what I expect it to do except for when it comes to excerpts. It prints nothing for the excerpt, not even HTML tags.
$excerpt =apply_filters('the_excerpt', get_post_field('post_excerpt', $post_id));
instead of$excerpt = get_the_excerpt($postID);