Forum
Exclude Current Post
Hi there,
I'm creating a blog post that showcases the latest blog items in the sidebar, which is easy enough by copying the the post_in_list.html template.
But what i was wondering is, if the user is in reading a blog post is there a way to exclude that post from the list in the sidebar?
Many thanks,
Yes, you just need to filter for posts that don't match the current slug.
Amazing, thanks Drew!