Viewing 1 replies (of 1 total)
  • Ike Ten

    (@ike-ten)

    Yes use <?php the_post_thumbnail(); ?> and <?php the_excerpt();?>

    Example :

    if ( $custom_query->have_posts() ) : while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?>
    <h3><a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></h3>
    <p class="details">By <a href="<?php the_author_posts() ?>"><?php the_author(); ?> </a> / On <?php echo get_the_date('F j, Y'); ?> / In <?php the_category(', '); ?></p>
    <?php if (has_post_thumbnail()) : ?>
     
    <figure> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a> </figure>
    <p ><?php the_excerpt();?></p>
    <?php
    endwhile;
    endif; else:
    endif;
    ?>
    • This reply was modified 8 years ago by Ike Ten.
    • This reply was modified 8 years ago by Ike Ten.
    • This reply was modified 8 years ago by Ike Ten.
    • This reply was modified 8 years ago by Ike Ten.
Viewing 1 replies (of 1 total)
  • The topic ‘Thumbnails & Description’ is closed to new replies.