I'm trying to display my latest 3 blog posts on my website homepage. I've got everything so far (Content, Image and Date). However it's not allowing me to display the authors name with link so that people can click on the author and see what their latest posts have been. Does anybody know why this is happening?
My code so far:
<div class="col-sm-6">
<?php
$args = array( 'numberposts' => 2, 'offset' => 1, 'post_status'=>"publish",'post_type'=>"post",'orderby'=>"post_date");
$postslist = get_posts( $args );
foreach ($postslist as $post) : setup_postdata($post);
?>
<div class="blog-post blog-media wow fadeInRight" data-wow-duration="300ms" data-wow-delay="100ms">
<article class="media clearfix">
<div class="entry-thumbnail pull-left">
<div class="img-responsive smallBlogImage"><?php getTheFirstImage(); ?></div>
<span class="post-format post-format-gallery"><img class="blogIconSmall" src="IsosecWeb/images/IsosecIcon.png"></span>
</div>
<div class="media-body">
<header class="entry-header">
<div class="entry-date"><?php the_date(); ?></div>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</header>
<div class="entry-content">
<p><?php echo wp_trim_words(preg_replace("/\< *[img][^\>]*[.]*\>/i","", get_the_content(), 80), 20); ?></p>
<a class="btn btn-primary" href="<?php the_permalink(); ?>">Read More</a>
</div>
<footer class="entry-meta">
<span class="entry-author"><i class="fa fa-pencil"></i> <?php echo the_author_posts_link(); ?> </span>
</footer>
</div>
</article>
</div>
<?php endforeach; ?>
</div>
echoit still gives me nothing, is there anything wrong in my code that i'm not calling to get the information? - YaBCK