Usage: {{post_class}}
Description
{{post_class}}
outputs classes intended for your post container, useful for targeting posts with styles.
The classes are as follows:
post
- All posts automatically get apost
class.featured
- All posts marked as featured get thefeatured
class.page
- Any static page gets thepage
class.tag-:slug
- For each tag associated with the post, the post get a tag in the formattag-:slug
.
For example:
A post which is not featured or a page, but has the tags photo
and panoramic
would get post tag-photo tag-panoramic
as post classes.
A featured post with a tag of photo
would get post tag-photo featured
.
A featured page with a tag of photo
and panoramic
would get post tag-photo tag-panoramic featured page
.
Setting a post as featured or as a page can be done from the post settings menu.
Example Code
<article class="{{post_class}}">
{{content}}
</article>