Setting default category for page

Last updated

By default Ecwid store shows a list of root categories on the page. You can change this behavior and display a particular product category, when customers open the storefront for the first time. This is useful if you only have one category or want to display a specific set of items (e.g. "Featured Products") to new visitors.

In Ecwid plugins for WordPress, Joomla, Wix and Facebook there is a special option: "Default Category" where you can select which category page will open. Check the guide on how to use this option in each plugin below.

In this article:

Facebook

  1. Open Ecwid Facebook app settings page
  2. Click Settings.
  3. Find the Category opened by default option.
  4. Select the category page that will be displayed when the store loads.

image7.png

  1. Click Save to apply the changes. 

WordPress

  1. In WordPress Dashboard navigate to Pages.
  2. Find your online store page and click Edit.

image8.png

  1. Click Edit store above the text editor area. The menu with store appearance settings will open.

image6.png

  1. Switch to the Appearance tab.
  2. Find the Category shown by default drop-down.
  3. Select the category page that will be displayed when the store page loads.

image4.png

Wix

  1. In the Wix website editor open the page where your Ecwid online store is added.
  2. Click on the store area.
  3. Click Settings.

image1.png

  1. Switch to the Design tab and scroll down.
  2. Find the Default Category option.

image3.png

  1. Choose the category you want to show
  2. Click Save.

Joomla

  1. In Joomla Control Panel navigate to Components → Ecwid → Advanced settings:

image2.png

  1. In the Category shown by default drop-down select the category that you want to display:

image9.png

  1. Click Save.
In case Ecwid is installed to several pages of your Joomla website, you can select a different default category for each of the pages.
  1. Navigate to Menus.
  2. Open the page where Ecwid is installed in edit mode.
  3. Switch to the Basic Ecwid settings tab.
  4. Find the Category shown by default drop-down.
  5. Choose the category to open on this page:

image5.png

  1. Click Save. 
  2. Repeat the steps for each page where Ecwid is installed. 

Embed code

In case your Ecwid store is installed on your website by means of embed code, you can set the default category for the page by adding a special parameter into the code:

defaultCategoryId=%categoryId%

This is a sample embed code that opens a list of root categories (without the default category ID parameter):

<div> <script type='text/javascript' data-cfasync="false" 
src='https://app.ecwid.com/script.js?1003'></script> <script type='text/javascript'> xProductBrowser("categoriesPerRow=3","views=grid(3,3) list(10) table(20)","categoryView=grid","searchView=list","style="); </script> </div>

This is the same code that opens a particular category page (with the default category ID parameter):

<div> <script type='text/javascript' data-cfasync="false"
src='https://app.ecwid.com/script.js?1003'></script> 
<script type='text/javascript'> 
xProductBrowser("categoriesPerRow=3","views=grid(3,3) list(10) table(20)",
"categoryView=grid","searchView=list","style=","defaultCategoryId=3003");
</script>
</div>

The category is defined by its ID. In our example it’s 3003. The category ID is included into the category page URL. If you can’t find it, check the guide on how to get the ID of your product or category.

Back to top
Has the article answered your question?