On my home page, I'm showing the last 3 blog posts with their respective titles, texts and their featured images. I need to change the featured image at homepage to each blog to the image of the author blog post but I'm not sure where to put the function. Any ideas?

This is the function that ive always used:

<?php echo get_avatar( get_the_author_meta( 'ID' ) , 5); ?>
$the_query = new WP_Query("post_type=post&paged=".get_query_var('paged'));
while ( $the_query->have_posts() ) : $the_query->the_post();

<?php the_excerpt(); ?>
<p><?php the_author_image(); ?></p>

<?php endwhile; ?>
  • You should add content to explain your code, the solution for the question so that readers understand what you mean, what the source do. – bueltge Apr 20 '18 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.