Need help? Check out our Support site, then

Changing names of category archive pages

  1. boschpackagingpharmana


    Any help would be appreciated. I want to change the names of my category archive pages to just be the category names themselves, without the text "You are currently browsing the category archive for the ‘xxxxx’ category.

    The blog I need help with is

  2. Every theme displays titles like these a little differently, and unfortunately I don't think there's a way to change this one according to your preference.

  3. boschpackagingpharmana

    Bummer. Thanks.

  4. Actually it SHOULD be possible. It's got to be in the CSS somewhere and you could either move that text so it doesn't display or make it the same colour as the background. I don't know the code, though.

  5. raincoaster, they want to remove PART of the sentence, not the sentence as a whole. Also, that theme uses the same css class across a whole bunch of titles, so hiding it would mess up a bunch of other things.

  6. boschpackagingpharmana

    I don't know css, but have a programming background. Would it be possible to put some sort of conditional statement in the CSS (If/then) to only apply a style to certain situations?

    You are right lettergrade, I definitely don't want other page titles affected.

  7. You could add conditionals if you had access to the theme files, but does not include access to those. (It's part of keeping everything very robust.)

    You can get an upgrade to custom css on, but in this situation (because that only applies attributes to classes and classes apply to the whole text line in this case), that's not going to do what you need to do.

  8. boschpackagingpharmana

    Okay. Thanks for the insight.

  9. On many of the newer themes the category name has its own selector, so what you're looking for would be easy to do. On Tarski there's no such selector, so you cannot do it once for all. But it's not impossible. What you can do (if you continue to use this outdated theme) is remove the whole section and enter each category name manually. If you're interested in this, let me know.

  10. boschpackagingpharmana

    Very interested. I would only have to do it a finite number of times (about 10).

  11. Assuming you want to remove both the phrase "You're currently [etc]" and the heading "Category Archive", try adding this:

    .category .archive {
    display: none;

    Then add this 10 times:

    .category-ID #primary:before {
    content: "NAME";

    Replace ID and NAME with the actual id number and name of each category. (Do you know how to find the category id numbers?)

    Then add this to style these custom category names:

    .category #primary:before {
    border-bottom: 1px solid #CCCCCC;
    display: block;
    font-weight: bold;
    margin-bottom: 1.5em;

    (Obviously you can add more properties and values for further styling.)

  12. boschpackagingpharmana

    I really appreciate a possible solution with this. I do not know how to find category id numbers...

  13. Go to Dashboard > Posts > Categories. When you hover over a category name, the link that appears in the url bar (or in the address bar if you click on the category name) will have a portion something like this:


    In this case, 25514 is the category ID. Yours will be different! But that's how you can find it quickly.

  14. boschpackagingpharmana

    Unfortunately, this did not work. There were no changes upon the inclusion of the lines:

    .category .archive {
    display: none;

    I assume that was to make the conventional title disappear, but it didn't.

    The subsequent lines did not initiate any changes, either.

  15. The codes I suggested have not been added to your CSS. Did you delete them yourself? Try again please, so I can check the result.

  16. boschpackagingpharmana

    I had deleted it out, but I tried it again today, and it works! Not sure what is different. This is a huge deal for me -- can't thank you enough. One final question -- is this possible for tag pages (rather than category)? Thanks again!

  17. boschpackagingpharmana

    Uh oh. This works perfectly for one category, and not at all for another. I left the CSS in there, if you have a chance to look.

  18. You're welcome.

    a) Now that the additions have been applied, I'm seeing you need a small improvement. The category names get cut off at the top, and the bottom border is too close to the text, so you need to increase the line height. Add this to the .category #primary:before rules:
    line-height: 140%;

    b) Archive pages are all similar, so yes, of course you can use the same trick for tag pages. Add the same set of codes and replace ".category" with ".tag".

  19. This works perfectly for one category, and not at all for another.

    Which one?

  20. boschpackagingpharmana

    In my left hand navigation, I have a category called Company News. That one works perfectly. I also have a navigation item called Video Technical Tips -- that one won't work, and I have checked my syntax and the category number meticulously.

  21. boschpackagingpharmana

    Upon further investigation, the times I was not seeing a successful change just had to do with saving the CSS and refreshing after a momentary wait. This all works perfectly. Many thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic