How to not show current blog post in 'other post' after blog

  • So I'm adding a blog to my website which is going well so far.


    I'm trying to keep the blog very simple. There's only 2 parts. Post List and Post. I'm not using any tags as it's unlikely there will be enough posts to make it relevant.


    After a blog post, I'm trying to show 2 'read more' posts using my list template.


    I just want to simply display the 2 latest posts, not including the currently viewed post. Is this possible?

  • drewm

    Approved the thread.
  • You can use the filter option to show every post except the post with the current post slug, like this:


    Code
    1. perch_blog_custom([
    2.         'count' => 2,
    3. 'filter' => 'postSlug',
    4. 'match' => 'neq',
    5. 'value' => perch_get('s')
    6. ]);