• Hi all.
    This is my site
    1. As you can see I have images and titles of the category. How can I remover those titles, WITHOUT removing the titles on the subcategories and the products?
    In other words. I need this code to target the category from the link above only.

    .woocommerce ul.products li.product h3 {
      display: none;
    }

    2. The other thing. Right now I’m hiding product and category description with this code:

    div.term-description {
      display: none;
    }

    How can I add an exception? I need to have a description on this page.
    Thank you in advance.
    Best regards, Vlad!
    PS: Sorry for the questions, I know it is entirely css based but I can’t find the solution alone.

    https://www.ads-software.com/plugins/woocommerce/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    1. Target li.product-category h3

    2. Look at the body tags of your pages. You should be able to target those unique class names.

    Thread Starter kartus

    (@kartus)

    Hi, Mike.
    Thank you for your response.
    This code includes hiding the titles of my sub-categories. I need only to hide only one category. In my humble and inexperienced opinion the code should be something like
    li.product-category.page-id ??? h3 {display: none:}
    And of course page ID is the wordpress way to do it. I know my category ID but I can’t figure out how to target it. I don’t know what should i write instead of page-id.

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Hey kartus,

    Hmm, you can target the h3 inside of the anchor tag using anchor target selector like

    .woocommerce ul.products li.product a[href="https://example.com/category-link"] h3 {}

    Of course this is only a viable solution if you just have a handful of categories that need there titles hidden.

    And then if you are hiding all category descriptions except for one, why not just delete all of the other descriptions? Alternatively, .term-elkaer-maskiner will be specific to that page.

    Thread Starter kartus

    (@kartus)

    Hi. Sorry for not responding for a while.
    Caleb, the code with a link inside does not work :(.
    And about the descriptions. I’m using the description area for SEO and something weird like taking notes in there. I mean like machine prices, orders and stuff like that. Something that only I can see but I don’t want others to сее.
    Example: In the tractors category I write the specifications of the models I have in stock in Bulgaria, prices, who has asked me for them etc.
    In other words – i use that area instead of carrying my laptop, price lists and other documents I often need.
    And in one of the categories I will need an actual description :D. Thats why I need to make an exception.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide titles on specific categories only and add exceptions’ is closed to new replies.