Then you’ll also need to add a tax query to your query. See the WP_Query() doc https://codex.wordpress.org/Class_Reference/WP_Query
I can’t say how you’ll need to incorporate this, but it will involve figuring out what taxonomy/term WP is already using.
Either that or there’s some debugging you’ll need to do in what I’ve provided. The code I provided was not tested, it was put together based on the information you’ve given.