כיצד ניתן להסתיר את כל תת-הקטגוריות מדף הבית?

Hello all,

i’am search for “how can i hide all subcategories from homepage”. I would like this to do because we have now over 50 subcategories, and it becomes very long to scroll down. Is there a way to hide this subcategories from homepage from on specific maincategorie?

3.1.0.beta2 is installed.

Found this

not tested, but i thing it does something different.

Very thanks and best Regards :slight_smile:

לייק 1

You are so disliking this answer, but you are asking wrong question. You are now trying to solve out an issue that came from your earlier acts and the real question should be:

If I don’t and can’t show sub-categories for users at their first navigation point, and sub-categories will be kind of hidden option, why I’m using sub-categories at all and should I ditch them and use tags instead.

לייק 1

Hi boopsy!

Yes, it’s certainly possible with CSS, to be added in your admin panel.

Customization → Theme → Edit CSS/HTML

From the category page:

.categories-list .subcategories {
     display: none;
}

Can you clarify this part?
Do you use subcategories boxes?

4 לייקים

I mean the part directly on startpage. First have one categorie and after you can add subcategories to this “i say” maincategorie. You can see the subcategories under a maincategorie. With dots and the name. This is what i would hide, because it is to long.

After i click directly in a maincategorie, i would like to see alle subcategories there, so the default again.

tested, yes it works, but with this all subcategories are now hide.

You may want to look at this theme component.

I think it will.do what your looking for.

There are also site settings that affect how categories are displayed and othet Theme component like Modern Category Boxes.

לייק 1

אני מריץ את Discourse גרסה 3.5.0.beta8-dev ואני צריך לערוך את ה-CSS של הנושא כדי לבדוק כמה שינויים קטנים. כיצד אוכל לגשת ל-CSS? מצאתי כמה מדריכים אבל נראה שהם עבור ממשק האינטרנט הקודם ואינם תואמים לגרסה הנוכחית. תודה על עזרתך.

צריך להיות רכיב ערכת נושא ספציפי לערכת הנושא שלך. חפש אחד עם קטעים בשם.

Remote themes and default themes do not have the section for customizations. Instead, you can make the changes in a theme component which you add to the theme.

לייק 1

תודה @Moin, אתה הטוב ביותר!

אני מנסה להוסיף קוד CSS כדי להסתיר את ה-“SUBCategory “Otros”” (זהו ה-slug: Otros-t) שיש להם את אותו השם בקטגוריות הורים שונות. אני אנסה להוסיף רכיב כפי שהמלצת עם הקוד הזה:

.category-list-item.category-Otros-t {
display: none !important;
}

כל עצה… תתקבל בברכה רבה.

לסיכום, במקרה שלי לא הייתי צריך להסתיר את הקטגוריה, פשוט העברנו את הפוסטים לקטגוריה אחרת והסרנו את הקטגוריה ה"בעייתית". תודה שוב לכולם.

לייק 1