Adding Category Filtering to Your BigCommerce Theme

BigCommerce Updated Also for: Shopify · Turbify
Quick info
To show Search Magic's filters and sorting on your category pages, add one line to your theme's category template. Work on a copy of your theme.

What it does

Search Magic can replace the product listing on your category pages with its own, with filters and sorting. For that, your theme's category template needs a place for Search Magic to draw it. This guide adds it.

We can do this for you: email us at help@yourstorewizards.com.

Before you start

  • Enable Category Page Filtering turned on in Store Settings.
  • Access to your theme in the BigCommerce control panel.

Step-by-step

  1. Copy your theme. Go to Storefront → My Themes. On your current theme, click Advanced, then Make a Copy. You'll edit the copy, so your live store isn't affected until you're ready.

    The Advanced menu on the current theme with Make a Copy

  2. Edit the copy's files. On the copy, click the … icon, then Edit Theme Files. If a message appears, click Edit Theme Files again.

    The theme copy's menu with Edit Theme Files

    The Edit your theme files? message with the Edit theme files button

  3. Open the category template. In the theme editor, open templates → pages → category.html.

    templates/pages/category.html open in the BigCommerce theme editor

  4. Add the Search Magic line. Inside the page's main div, add:

    <div id="search-magic-section" data-category="c{{ category.id }}"></div>
    

    category.html with the Search Magic line added inside the page div

  5. Hide theme parts you don't want (optional). Add the class search-magic-remove to any part of the template that Search Magic should remove from its category pages.

    category.html with the search-magic-remove class added to the sidebar and product listing

  6. Save and apply. Save the file, check the copy, then apply it to your store.

  7. Turn pages on. Enable each category page in Search Magic. See Category pages.

Troubleshooting and FAQ

A category page still shows my theme's products

Check that the category page is enabled in Search Magic, and that the line above is in the category.html of the theme your store is using. New category pages start turned off.

Questions? Email us at help@yourstorewizards.com.