X hide

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

From Plumrocket Documentation

You are viewing:  Product-Filter-32.png  Layered Navigation

Displaying Layered Navigation Manually

If you use custom Magento 2 theme (e.g. not Luma), and, for some reason, the Product Filter Toolbar didn't display on frontend after installation, 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('Magento\Catalog\Helper\Output');
?>
<?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 = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
 } else {
 $viewMode = 'list';
 $image = 'category_page_list';
 $showDescription = true;
 $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW;
 }
Navigation