Only show primary category in archive page

This topic has 5 replies, 2 voices, and was last updated 2 years, 5 months ago ago by ziga32

  • Avatar: ziga32
    ziga32
    Participant
    June 29, 2022 at 10:39

    Hello

    Here I have 3 categories showing.
    https://www.komponentko.si/racunalniki/ce-certificirani/
    https://i.imgur.com/mirsMtK.png

    I only want to show the first one, so I use this css
    div.products-page-cats > a:nth-child(2),
    div.products-page-cats > a:nth-child(3) {display: none !important;}

    which is ok, but I can’t remove commas.
    https://i.imgur.com/5WLzCMH.png

    Can they be removed as well?

    4 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 29, 2022 at 10:44

    Hello,

    Edit product > [8theme] Product Options > Primary category

    Regards

    Avatar: ziga32
    ziga32
    Participant
    June 29, 2022 at 10:48

    thank you, but can this be done with css, so I don’t need to edit all of my products?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 29, 2022 at 10:51

    Try the next code

    .content-product .products-page-cats {
        font-size: 0px;
    }
    .content-product div.products-page-cats > a:nth-child(1) {
        font-size: 14px;
    }

    Regards

    Avatar: ziga32
    ziga32
    Participant
    June 29, 2022 at 10:54

    wow, what a great workaround, very grateful!

  • Viewing 5 results - 1 through 5 (of 5 total)

The issue related to '‘Only show primary category in archive page’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.