Default category heading not hidden when category banner is used

AI-generated summary

Users are discussing an issue with the discourse-category-banners component where the default category heading is not hidden when a category banner is used. Westcan reports that the category description appears in both the banner and its default position, which can be fixed by adding CSS to hide the default heading. gru provides the CSS code to hide the default heading. microhit mentions a similar issue with category images appearing twice and asks how to center-align text with the image. Moin agrees with the suggestion to hide the default heading. microhit confirms the CSS fix worked and asks about centering text. Arkshine suggests using a setting to center the text. awesomerobot announces that the component has been updated to automatically hide default banners when a component banner is present.

Great theme component for categories! I’m running into an issue when I add a category logo that the category description displays in the default position on the category page as per the screenshot below. Is there a way to turn off the default placeholder of the category description from displaying when the “discourse-category-banners” is enabled? I would like the category description to display in the banner just as it is now. If I turn off the category logo then it displays correctly, seems to maybe be an issue when you have the category logo enabled. Any suggestions would be appreciated. Thanks

2 Likes

I had the same issue. You can fix that by editing your CSS:

.category-heading {
  display: none;
}
4 Likes

So if i have an image for a category, it shows image twice, for example - within the banner category and also outside. How to get rid of the outside image?

2 Likes

Seems a good idea to hide the default heading when the category banner is used. As long as the component doesn’t do it, you can use the css code provided by @gru above. (In case you need it there is a guide about how to Making custom CSS changes on your site)

5 Likes

Thanks, i edited the main theme css, and the image disappeared.

I just have one more question - is there any way to center align the text with image ?

1 Like

There is a setting to center the text. Give it a try!

image

2 Likes

I’ve just added CSS to the component that will hide the default banners automatically when the component banner is present, thanks for sticking with the custom workaround for a while!

2 Likes