Homepage only Content Widget


(Hamza Ahmed) #1

Discourse provides Theme HTML/CSS area to add anything above topics (after the header) and it awesome but I need to only show that content on the homepage. How can I do so?
Is there any way to show HTML content on top of threads on homepage only?
Thanks in advance.


(Jesse Hanley) #2

An easy way to tackle it, like we have, is just create a simple <div> with accompanying CSS to hide it.

Then using Javascript/jQuery just check if the user is on the homepage and update the CSS to display it if they are :blush: