Magento – Trouble removing pager from toolbar in Magento 2

magento-2.0magento2pagertoolbar

Having trouble removing the pager from the category pages within Magento 2. I extended the catalog module and placed the removal reference inside catalog_category_view.xml. This however does not work, any help is appreciated.

<referenceBlock name="product_list_toolbar_pager" remove="true"/>

Best Answer

Add default.xml in any of your custom module with following code. It will remove pager.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product_list_toolbar_pager" remove="true" />
    </body>
</page>