I would like to remove the tool bar from my theme since I don't have that many products.

So far I have tried this in my /app/design/frontend/VENDORNAME/THEME/Magento_Theme/layout/default.xml

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

Also I tried to replace /app/design/frontend/VENDORNAME/THEME/Magento_Theme/templates/html/pager.html with a empty file.

3 Answers 3


Removing the toolbar can be done in current theme dir by commenting in


the 2 lines with

<?php echo $block->getToolbarHtml() ?>

To hide it only in category page than wrap getToolbarHtml() with an if statement.

<?php if (!$this->getMyHideFlag()): ?>
  <?php echo $block->getToolbarHtml() ?>
<?php endif; ?>

In custom module's layout/catalog_category_view.xml add 'my_hide_flag' argument (or use layout instruction <action>). Set this 'my_hide_flag' to 1. Reference the block 'category.products.list'. http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-instructions.html

Toolbar block is called in


Removing the toolbar and than calling toolbar block object in _beforeToHtml may trigger fatal errors.

Or hide the toolbar from css/less. Magento default css/less hides sorter, limiter, pages and view mode in top and bottom tollbars.

  • I have tried hiding sorter from css but its not working.
    – Siva
    Commented Aug 8, 2019 at 7:34

Add it to catalog_category_view.xml layout in you custom theme


Then clear cache and toolbar will disappear

<referenceBlock name="product_list_toolbar" remove="true" />
  • please try to describe your answer. And if you are not sure with your answer its better to write a comment instead of posting it as an answer.
    – Priyank
    Commented Mar 20, 2017 at 10:37
  • Perfectly normal answer! the only thing, replace display="false" with remove="true" and works like a charm
    – Devtype
    Commented Aug 3, 2018 at 21:37

Another way is to change the template file of the toolbar.

Create a new blank file in /<theme_dir>/Magento_Catalog/templates/blank.phtml

Update the toolbar template via catalog_category_view.xml

<referenceContainer name="content">
    <referenceBlock name="product_list_toolbar" template="Magento_Catalog::blank.phtml" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.