Show posts based on author name

Show to show posts written by specific author name.

You use a for loop with something like:

{% for post in site.posts %}
{% if post.author == [author's name] %}
<div>
<a href={{post.url}}>{{post.title}}</a>
</div>
{% endif %)
{% endif %)

Or a little more condensed:

{% assign author_posts = site.posts | where:"author","[Author's name]" %}
{% for post in author_posts %}
...html stuff...  // for entire post use {{post.content}}
{% endfor %}

If you google, there should be a number of different examples out there to help understand this sort of thing.

Hope this helps you though.

2 Likes