Remove tag dropdown for categories with no existing tags

Is it possible to do this?

Currently, when on a category page for a category with no tags, the dropdown just shows “no tags” but otherwise has no function.

Thanks.

Hi Jonathan,

You can hide tag chooser with CSS.
Just create a new component in admin and add this to the CSS section.

.category-example-name #reply-control .mini-tag-chooser {
    display: none;
}

example-name is the category name.

Thanks :slight_smile: I could do that, and remove it on a category when I notice that one or more tags have been added to that category.

I’ll mark your CSS answer as a solution, but it still would be good if the developers could consider the original request as an option for Discourse itself.

Now that I’ve sorted it out, I’ll add the following for completeness and accuracy.

The solution above answers a different question to the one I tried to ask, but is very helpful. It prevents new tags from being added when creating a new topic.

To prevent the tag dropdown from appearing when viewing a category page, I needed the following:

.category-example-name .tag-drop {
    display: none;
}

Both these, taken together, seem to solve the problem as well as is possible with CSS. And it was a good first practice at creating a theme component. Thanks.

1 Like

I added this to remove the tag dropdown when editing the title of a topic:

/* Editing title etc of topic */
.category-example-name .mini-tag-chooser-header {
    display: none;
}

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