Archived topic
Possible to use a hook to add element above the top bar?
3 replies · Started by Gordon on July 2, 2019
I was wondering if there is a way to use a hook and add an element above the top bar? It looks like as high as we can go is above the header which in code is below the top bar. I'm trying to add a sales message site-wide above all other content. If this is not possible, do you have any other ideas suggestions to make something like this work? Thanks in advance.
Hi there,
The top bar is hooked into the generate_before_header hook with a priority or 5. So if you add a Hook Element using that hook, you just need to add a priority lower than 5 for it to show above the top bar.
Let me know if you need more info :)
Works perfectly. Thanks kind sir!
Glad I could help :)