So, you would do this easier in the products.php template
do you code at all? for example, i skip products that have a price set to ZERO
When my products are out of stock, I set the price to ZERO
You can check for "keyword" in the url, then do a continue on the discontinued etc
foreach ($products as $product ) {
if ($product->prices['product_price'] <=0) continue;