I want to exclude product who has specific attributes in category product listing page.
I have created one attribute product_disble_listing
. if product_disble_listing
set yes to product that product not show in listing page. override below block in custom module.
Magento\Catalog\Block\Product\ListProduct
and I have added below code in custom module.
$this->_productCollection->addAttributeToFilter('product_disble_listing', array('neq' => 1));
product collection show correctly but product count, pagination, price filter, color attributes are showing wrong data.