UPDATE: I have determined the answer to the first half of the question. Will document in comments, and will create a separate question for the randomizer issue.
----
For the blog whose slug is "blog" I'm successful with theming like this:
{% for post in page.blog.most_recent_blog_posts limit:5 offset:1 %}
{{ post.published_at | date: '%b %d' }}
{{ post.headline }}
{% endfor %}
But what if we have a second blog whose slug is "recipes?" How do we pull most recent posts from there? (I also want to randomize the selected blog posts.)
So, seeking assistance on both fronts: accessing most_recent_blog_posts for multiple blogs, and randomizing their display (which I imagine will be done with jquery.)
Official response from Taylor Pineiro
Please see below.
Share this post
Showing 4 reactions
Sign in with
- edit the custom template for the ‘home’ page.
- create _blog_latest.html
- create _recipes_latest.html
- edit theme.scss
The key that determines which blog items are called is the { % subpage } tag. So… the custom home template calls something like this:
<div id=“home_1” class=“padbottom”>
{ subpage “blog” with “blog_latest” }
</div>
<div id=“home_2” class=“padbottom”>
{ subpage “recipes” with “recipes_latest” %}
</div>
Use the theme.scss file to float the .home_1 column to the left.
(I’ll post a separate question regarding randomized content.)