Magento Layered Navigation Extension v3.x Developer Guide and API Reference

Displaying Layered Navigation Manually

If you use a custom Magento 2 theme (e.g. not Luma), and, for some reason, the Product Filter Toolbar didn’t display on the frontend after installation of the Magento 2 Layered Navigation & Product Filter extension, please follow the instructions below to make it displayed manually.

Find the following file of your theme:

/app/design/frontend/THEME_VENDOR/theme_name/Magento_Catalog/templates/product/list.phtml

Copy the following code:

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

And add it after the code:

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

Code Result

<?php
        $_productCollection = $block->getLoadedProductCollection();
        $_helper = $this->helper('MagentoCatalogHelperOutput');
    ?>
    <?php if (!$_productCollection->count()): ?>
        <div class="message info empty"><div><?php /* @escapeNotVerified */
            echo __('We can't find products matching the selection.') ?></div></div>
    <?php else: ?>
        <?php echo $block->getToolbarHtml() ?>
        <?php echo $block->getAdditionalHtml() ?>
        <?php
            if ($block->getMode() == 'grid') {
                $viewMode = 'grid';
                $image = 'category_page_grid';
                $showDescription = false;
                $templateType = MagentoCatalogBlockProductReviewRendererInterface::SHORT_VIEW;
         } else {
                $viewMode = 'list';
                $image = 'category_page_list';
                $showDescription = true;
                $templateType = MagentoCatalogBlockProductReviewRendererInterface::FULL_VIEW;
         }

Was this article helpful?