Limit related posts to primary tag
If we matched by all tags, the "latest posts" were getting hogged by a small set of posts that had many tags. Now, since we're more restrictive, we end up throwing up new posts every time! Also, we are allowing posts with the primary tag matching *any* of the current post's tags; it doesn't just have to match the current posts's primary tag.
This commit is contained in:
parent
735508cdec
commit
5e23bb65e6
1 changed files with 1 additions and 1 deletions
2
post.hbs
2
post.hbs
|
@ -116,7 +116,7 @@ into the {body} tag of the default.hbs template --}}
|
|||
This query gets the latest 3 posts on the site, but adds a filter to
|
||||
exclude the post we're currently on from being included. --}}
|
||||
|
||||
{{#get "posts" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="authors" limit="3" as |more_posts|}}
|
||||
{{#get "posts" filter="primary_tag:[{{post.tags}}]+id:-{{post.id}}" include="authors" limit="3" as |more_posts|}}
|
||||
{{#if more_posts}}
|
||||
{{#foreach more_posts}}
|
||||
{{> "post-card"}}
|
||||
|
|
Loading…
Reference in a new issue