Documentation
Blog
The blog tag displays blog posts.
Tags
{pyro:blog:posts}
Display all blog posts or blog posts by category.
Attributes
| Name | Default | Required | Description |
|---|---|---|---|
| category | All Categories | No | Display posts from this category only. |
| limit | 10 | No | The maximum number of posts to display. |
| order* | asc | No | *Deprecated in v1.3.0 order-dir and order-by have taken it's place. |
| order-by | created_on | No | Choose which column to sort by. (category_title, title, author_id, created_on, updated_on) |
| order-dir | asc | No | The direction to sort results by. (asc, desc) |
Example
{pyro:blog:posts limit="5" order-by="title" order-dir="desc" category="pyrocms"}
<h2>{title}</h2>
<p>{intro} <a href="{url}" title="Read more about: {title}">Read more</a></p>
<p>Written by: <a href="/users/profile/{author_id}">{author_name}</a></p>
{/pyro:blog:posts}
