Skip to content

Instantly share code, notes, and snippets.

@wvuwebgist
Last active June 3, 2020 20:54
Show Gist options
  • Save wvuwebgist/213792772bef727c386ac8272ee00409 to your computer and use it in GitHub Desktop.
Save wvuwebgist/213792772bef727c386ac8272ee00409 to your computer and use it in GitHub Desktop.
CleanSlate: Add a featured blog post to a page on my site.
<r:blog id="197"> <r:comment><!-- Change to your blog's page ID --></r:comment>
<r:articles:each tags="featured" limit="1"> <r:comment><!-- Change the tag(s) to what you want to feature. Comma separate multiple tags. --></r:comment>
<article class="wvu-article">
<h2 class="wvu-article__title"><a href="<r:article:path />"><r:article:name /></a></h2>
<p class="wvu-article__meta">
<r:article:author_full_name /> |
<time class="wvu-article__date" datetime="<r:date_format format="iso8601" value="{article:published_at}" />"><r:date_format format="%A, %B %d, %Y" value="{article:published_at}" /></time>
</p> <!-- /.wvu-article__meta -->
<div class="wvu-article__body">
<r:select_html css_selector="p" limit="1">
<r:article:content name="article-body" />
</r:select_html>
</div> <!-- /.wvu-article__body -->
<p><a href="<r:article:path />">Read Full Article</a></p>
</article> <!-- /.wvu-article -->
</r:articles:each>
</r:blog>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment