Archived topic
Dismissable message at top of website
9 replies · Started by Justin on January 14, 2019
Hello, how would I go about adding a dismissable banner message at the top of my site (before the header)? Basically, I want to use this space for a message such as "January special, get 20% off with Code...." and the user would be able to click an x to close/dismiss the message. Is this possible with hooks/elements?
I'm using the newest version of GP Premium.
Hi there,
One of our users created this solution using top bar:
http://www.gmitropapas.com/generatepress-theme-tutorial-convert-the-top-widget-bar-into-a-notification-window/
Hope this helps!
This is perfect, I'll give it a try this afternoon. Thank you!
No problem :)
Follow-up question: I was able to follow that tutorial and it looked great when adding the additional CSS via customizer tool, but when I publish the changes, it looks like the CSS isn't sticking and the "x" to close the message is centered below the message (basically, any styling via CSS isn't saved). Any idea why?
Sounds like a caching issue.
Hi Leo - how would I go about solving for the caching issue? I am seeing the formatting issue with incognito windows.
Clear/turn off your caching plugins might be a good start.
I don't have any caching plugins at the moment...
Perhaps server cache?
Maybe try #1 here to eliminate plugin conflicts:
https://docs.generatepress.com/article/debugging-tips/
GP itself doesn't have the ability to stop CSS from loading if they are in Additional CSS.
Make sure there aren't any syntax error in your CSS as well.