Skip to content

Commit

Permalink
Merge pull request #1 from jimmydigital/develop
Browse files Browse the repository at this point in the history
Show only "post" types in main list and recent posts widget
  • Loading branch information
Vimux committed Dec 18, 2016
2 parents 51f50b6 + 47e5a63 commit c2b1f75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h1 class="page-title">{{ .Title }}</h1>
</header>
{{ end }}
{{ $paginator := .Paginate .Data.Pages }}
{{ $paginator := .Paginate ( where .Data.Pages "Section" "post") }}
{{ range $paginator.Pages }}
<article class="mr-loop-item post type-post hentry clearfix">
{{ if .Params.thumbnail }}
Expand Down Expand Up @@ -39,4 +39,4 @@ <h3 class="entry-title mr-loop-title">
</div>

{{ partial "sidebar.html" . }}
{{ partial "footer.html" . }}
{{ partial "footer.html" . }}
4 changes: 2 additions & 2 deletions layouts/partials/widgets/recent.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<div class="mr-widget widget_recent_entries">
<h4 class="mr-widget-title"><span class="mr-widget-title-inner">Recent Posts</span></h4>
<ul>
{{ range first 10 .Site.Pages }}
{{ range first 10 (where .Site.Pages "Section" "post") }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
{{ end }}

0 comments on commit c2b1f75

Please sign in to comment.