Nothing appears using get_the_excerpt() in category.php

I have checked the code. There are some issues in your code :

  1. There is not any method ‘coauthors_posts_links’ but WordPress provides a method the_author_posts_link();.
  2. Also for the ‘get_the_post_thumbnail()’ function 2nd parameter must be image size like
    $thumb = get_the_post_thumbnail($post, 'thumbnail',array('class' => 'front-page-tease-sm'));

I have updated the code. For ‘coauthors_posts_links()’ no idea what you want to do here ?


$cat = get_queried_object();
$posts = get_posts(array('posts_per_page' => 15, 'offset' => 0, 'category' => 1));

                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="";
                    $excerpt = get_the_excerpt($postID);
                    $thumb = get_the_post_thumbnail($post, 'thumbnail',array('class' => 'front-page-tease-sm'));

                    echo '';

                    // Left box - date
                    printf("https://wordpress.stackexchange.com/questions/246319/%1$s", esc_attr($date));

                    // Middle box flex - headline, author, and excerpt
                    echo '';
                    printf('%2$s', esc_attr($link), esc_html($title));
                    printf('By %1$s', $authors);
                    printf("https://wordpress.stackexchange.com/questions/246319/%1$s", $excerpt);
                    echo '';

                    // Right box - thumbnail
                    printf($thumb);

                    echo '';
                }