Skip to main content

How do a include recent blog posts on a non-blog page.

I want to set up a terrific home page, with a lot of different pieces of information and links.  I know how to include videos, page links, and photos.  Can you tell me how to add a summary of recent blogs on my home page (without making my home page the blog page)?

Official response from

Yes, the same technique will work with most page types. For example, if you wanted to display the latest 2 suggestions, you would create a new file called something like _latest_suggestions.html with and the following code:

{% for post in page.suggestion_box.most_recent_suggestions limit:2 offset:0 %}
<div style="font-weight: bold; font-size: 16px;"><a href="{{ post.url }}">{{ post.headline }}</a></div>
<div class="byline">
Suggested by {{ post.author.published_name_linked }} &middot; {{ post.published_at | date: '%B %d, %Y %l:%M %p' }}
{% if post.show_stream? %}
{% if post.public_activities_count > 0 %}
&middot; <a href="{{ post.url }}#reactions">{{ post.public_activities_count }} reaction{% if post.public_activities_count > 1 %}s{% endif %}</a>
{% endif %}
{% endif %}
</div>

{% if post.suggestion.content.size > 0 %}
{{ post.suggestion.content }}
{% else %}
<p>
{% endif %}
<div class="continue_reading"><a href="{{ post.url }}">Read more</a> &rarr;</div>
<hr/>
{% endfor %}

Then in the template of the page where you want the suggestions to display, paste in the following:

{% subpage "suggestion_page_slug" with "latest_suggestions" %}

Replace suggestion_page_slug with whatever the slug is for your suggestion page.

Share this post

Showing 7 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.