All standard wordpress pages have Excerpt fields as an option. This is good, because Excerpts can be super-awesome, especially if the person writing the page is long-winded and doesn't get to the point until the third of fourth paragraph. The Excerpt will summarize and present it front and center. WordPress has the Excerpt function for every post:
The WordPress Excerpt is an optional summary or description of a post; in short, a post summary.
The Excerpt has two main uses:
1. It replaces the full content in RSS feeds when the option to display summaries is selected in Dashboard › Settings › Reading.
2. Depending on the WordPress theme, it can be displayed in places where quick summaries are preferable to full content:
- Search results
- Tag archives
- Category archives
- Monthly archives
- Author archives
Hi Tim, the excerpt for a blog post can be defined in either Settings → SEO → Excerpt, or Settings → Social Media → Excerpt for Facebook, search engines.
Once you’ve entered and saved the excerpts of your blog posts, inserting the following liquid tag within the loop of your _blog_latest.html include should pull the respective page excerpts:
{{ post.excerpt }}
The first part of this tag (“post”) should, of course, correspond to the looping variable you’ve instantiated.
Here’s an example of what your _blog_latest.html might look like. The following sample pulls the titles and excerpts of the four most recent blog posts, and links to the original posts:
{% for post in page.blog.most_recent_blog_posts limit:4 offset:0 %}
<div>
<h3><a href="{{ post.url }}">{{ post.headline }}</a></h3>
<div class="excerpt">
<p><span>{{ post.excerpt }}</span></p>
<span class="read-more"><a href="{{ post.url }}">Read more</a>→</span>
</div>
{% endfor %}
Showing 8 reactions
Sign in with
{% for attachment in post.attachments limit: 1 }
<div><img src=“%7B%7B%20attachment.url%20%7D%7D”></div>
{ endfor %}
Tim Wayne
Certified Architect
Certified Expert
Tim Wayne
Certified Architect
Certified Expert
I want a blog feed on the home page. This is a standard feature – where the home page has the three or four most recent blog post titles, and the first 50 characters from the blog post. This blog feed is created by using the _blog_latest.html include.
Problem: the blog I am working on has many, many long-winded scientists as contributors. They often don’t get to the point in the first line – usually it’s in the second or third paragraph. Since the blog feed needs to convey the point of the blog entry, using blog_latest.html will not work.
After some research, I discovered the WordPress Excerpt function (described in my original post). This seems to do exactly what I want, if my blog were on WordPress.
I know there is an Except-type field on NationBuilder pages, but I couldn’t find one for blog posts. After you pointing it out, I did see that you can get to it via Website > [website] > [blog] > Posts & subpages > [post] > Settings… and from there, I am not sure. There’s an Excerpt under SEO, and there’s a Default post and Excerpt for Facebook, Search engines under Social Media. All three are big text fields that seem to want to hold a blog post summary.
My question: which of these could be used as content for a blog feed on the home page? I do NOT want to grab the first 50 characters of the post. That is useless information.
And, after knowing which of these could be used as a blog feed, how do I modify _blog_latest.html to pull the Excerpt and not the first 50 characters from the post?