Filtering "read next" posts

I’m using the Lyra theme and modifying it slightly for my use case. The other day I was able to make it so that my blogs and newsletters live in different collections. My blogs go to /blog/ and my newsletters go to /blog/newsletter/

The only problem is that while reading the blog, I see my newsletters in the footer where it recommends what to read next. I’d like to prevent those from showing.

Digging through post.hbs I found this excerpt, which seems to be where I need to change things. I’m just not entirely sure how.

If I understand you correctly I think I’ve already outlined the same issue a few months ago. Whereas you have problems with newsletters showing up in the Read Next section(s), I’ve got translated posts showing up there. You can read more about it in the following thread. Feel free to vote for it :wink:

1 Like

Hey @Avery, that can be fixed by changing the this line:

to this:

{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}+visibility:public" limit="3" as |related_posts|}}

Adding +visibility:public will filter the related posts to only posts that everyone has access to, i.e. public posts.