Home Forums WoodMart support forum Too many categories show in homepages’s AJAX PRODUCT TABS

Too many categories show in homepages’s AJAX PRODUCT TABS

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #723418

    tahmid.zaman
    Participant

    Since I add one product to multiple categories. My home page shows too many categories in AJAX PRODUCT TABS.

    How do I reduce that to only primary category?

    Attachments:
    You must be logged in to view attached files.
    #723433

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    By default, the Product Categories element displays all categories assigned to a product. There is currently no built-in option in WoodMart to display only the product’s primary category.

    You can check this setting by navigating to:
    Theme Settings > Product Archive > Products Loop > Show Product Categories

    When this option is enabled, all categories assigned to the product will be displayed.

    However, If you want to simply limit the displayed category text to one line or two lines in the product grid, please let me know. I will check and provide you with a custom CSS solution to limit the category text accordingly.

    Best Regards

    #723922

    dlovin
    Participant

    Greetings,

    I am in need of this same solution. We have products that are in multiple categories and I only want to show the one primary category on the product loops / category page. I have it happening on main cat and related prod.

    Using furniture 2 theme

    Attachments:
    You must be logged in to view attached files.
    #723945

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello @dlovin,

    By default, WoodMart displays all categories assigned to the product, and there is no built-in option to show only the primary category in the product loop.

    To display only the primary category, it would require a custom code customization.

    However, if you want to simply limit the displayed category text to one line or two lines in the product grid, please let me know. I will check and provide you with a custom CSS solution to limit the category text accordingly.

    Best Regards

    #723962

    dlovin
    Participant

    Yes please, tell me what you need from me and I shall provide it.

    #723963

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    I have checked your website, and on the products I tested on the home page and category pages, only a single category is assigned.

    Please share the page URL where the products have multiple categories assigned. I will check it and provide you with custom CSS to limit the displayed category text if needed.

    Please note that WoodMart does not have a built-in option to display only the primary category. This would require a custom code customization.

    Best Regards.

    #723964

    dlovin
    Participant
    #723974

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Since WoodMart displays all assigned categories by default and changing this strictly to a single “primary” category requires PHP customization, Try to use a clean CSS solution to truncate the category list. This will force the categories to stay on exactly one line and cleanly add an ellipsis (…) if they exceed the available space.

    Please add the following custom CSS to your website. You can paste it into Theme Settings > Custom CSS > Global Custom CSS:

    .wd-loop-prod-meta, 
    .product-categories {
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100%;
    }

    Best Regards

Viewing 8 posts - 1 through 8 (of 8 total)