• Resolved deinezauber

    (@deinezauber)


    Hi all,
    I’m working with Customizr 3.0.14 and I was looking for a clean way to remove the label “Category Archives” from the post category page; I’m using a child theme so I’d love to have some CSS rule or a function to put inside my functions.php.
    And is there a programmatically way to change or suppress labels in Customizr theme?
    Thank you a lot,
    Nicola

Viewing 8 replies - 1 through 8 (of 8 total)
  • To remove the header, In CustomCSS or style.css try:

    .format-icon {
      display:  none;
    }

    Not sure which ‘Labels’ you mean?

    Thread Starter deinezauber

    (@deinezauber)

    Thank you sir!
    Actually I’ve already applied the CSS rule you suggested me but I realized it was overstated because I do need a page title…

    So, let me detail better the problem: on the category page we have a breadcrumb and below it the page title; the page title has an icon (which I have already suppressed via CSS), the string “Category Archives” and then the category name (in my case “Sport”).
    Looking at the HTML code I see this:

    <h1 class="format-icon">
    Category Archives:
    <span>Sport</span>
    </h1>

    I’ve posted this question because I’m a newbie of CSS and WordPress so I don’t know a CSS rule for not displaying the “Category Archives” string or a hook to suppress its output during the page generating process.

    Then I was asking if I can somehow control (maybe using some other functions to add in my functions.php…) on how those fixed strings like “Category archives” are injected into the final HTML page by the Customizr theme.

    Thank you again for your ansswer!
    Best regards,
    Nicola

    Thread Starter deinezauber

    (@deinezauber)

    Ok, I think I’ve got the first point; to remove ONLY that “Category archives” I’ve added the following CSS rules:

    /* Hides the labels automatically added by WordPress to category pages */
    .archive .format-icon{
    visibility: hidden;
    }
    
    .archive .format-icon span{
    visibility: visible;
    float: left;
    }

    Anyway, the second question remains: how should I control the way Customizr theme (or maybe WordPress???) outputs the static labels like “Category archives”?

    Thank you in advance,
    Nicola

    Thread Starter deinezauber

    (@deinezauber)

    Ops! Sorry, the previous post had a bug that affected ALL of the title but I’m interested only in those with H1 tag, so:

    /* Hides the labels automatically added by WordPress to category pages */
    .archive h1.format-icon{
    visibility: hidden;
    }
    
    .archive h1.format-icon span{
    visibility: visible;
    float: left;
    }

    Regards,
    Nicola

    Terrific diagnosis and resolution!

    If you want to start examining php code (which is where the HTML is generated) then take a look at customizr/parts. The particular file you need is class-content-post_list. Around line 463 is where the Category Archives is generated.

    You could move that file into customizr-child/parts and start hacking it. If you do a lot to it then you may have problems when the core files are updated (3.0.15 coming soon). customizr-child needs to be changed to whatever you’ve used.

    Or you need to write a filter and add to child theme functions.php. Snippet1 will give you a start.

    If you want to avoid coding, you could try the Search-and-Replace plugin.

    Thread Starter deinezauber

    (@deinezauber)

    Thank you so much for your suggestions, I really liked the one about the Snippet11 and the capabilities of front-end rendering function filters!
    Best regards,
    Nicola

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to remove "Category Archives" label’ is closed to new replies.