Display Posts lets you limit posts to a certain category with the
But what if you’d like to show other posts in the current post’s category without having to type it out each time. This is especially useful in widgets and sidebars since you can add the shortcode once and it will automatically update to show content related to the current post.
I recommend you also use the
exclude_current="true" parameter so the current post is not included in the listing.
[display-posts taxonomy="category" tax_term="current" exclude_current="true"]
You can do the same thing with tags too.