Wie ändere ich den Text dieses Span-Objekts ohne Selektoren?

This object has the following HTML:

<span>Topic</span>

I’m wondering how one might use css to change this text to something else, e.g. “Blogs”.

EDIT: I would want to do this on a per-category basis.

1 „Gefällt mir“

This is customisable via /admin/customize/site_texts?q=Topics

I’m not sure exactly which one it is though…

You can figure it out by running I18n.enableVerboseLocalizationSession() in the JS console, reloading the page, then you’ll be able to correlate the number of the string with output in the console:

2 „Gefällt mir“

This would be for all categories though, right? I want to do it per category.

1 „Gefällt mir“

Hello :wave:

This is possible with CSS.

body.category-name {
  .topic-list-header {
    .default.topic-list-data {
      span {
        visibility: hidden;
        &:before {
          content: "Blogs";
          visibility: visible;
        }
      }
    }
  }
}
2 „Gefällt mir“

I wish I could give you 10 likes! Thank you so much, Don!

3 „Gefällt mir“

If you want to do this on multiple categories and avoid having many SCSS lines, you can use SCSS loops. It makes the code easier to read and maintain because you’ll just have to edit two SCSS variables.

4 „Gefällt mir“

I’m going to try to make this into a theme plugin, thanks for this loop idea!

4 „Gefällt mir“

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.