If I enter a query into the search bar I would like to see an excerpt (let's say 140 characters) of each entry that is related to the query.
Here is what I use on the search result page to display the results.
{% set query = craft.request.getParam('q') %}
{% set entries = craft.entries.search(query).order('score') %}
{% if entries|length %}
<p>{{ entries|length }} results:</p>
<ul>
{% for entry in entries %}
<li><a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>Your search for “{{ query }}” didn’t return any results.</p>
{% endif %}
How do I add entry excerpts like: https://craftcms.com/search?q=entry