WordPress

WordPress: Add a Top Message Bar

With the new site, I’d been looking for a top bar for WordPress for quite some time. Our last theme design actually had an entire section that could be pulled down that advertised our email subscription. This increased the number of subscribers so significantly that I incorporated the subscribe field directly into the header of the theme.

Now I just wanted a top bar to keep readers up to date on any key messages we wanted to remind them about… including news and events. I was going to write this directly into our theme but found WP-Topbar, a nicely written top bar plugin for WordPress. There were some others out there that has other features… like rotating messages or message scheduling, but the simplicity of this plugin won them over.

I appreciated that the top bar wasn’t hardcoded at the top of the page content; instead, it’s dynamically generated and appears with settings that include a delay and speed for displaying it… a really nice touch! You can control the colors (and even background image) of the bar, the message, add a link, and even apply your own CSS to it. The administration also has a preview so you can preview all of your changes before putting it live.

Note, there are some top bar plugins out on the market that are charging money… but I think this one is worth more!

UPDATE: I did make some updates to the plugin. It’s now loading from wp_footer rather than wp_head (that’s WordPress API talk) and I updated the div to have an ID and styling to fix the bar rather than having it relative. This way, the bar stays put while you scroll down the page.

10 Comments

  1. 1
  2. 3
  3. 5
  4. 6

    Why is this not working for me? I tried this plugin some 6 months ago and I couldn’t figure out how. It is installed perfectly and I managed the settings correctly I think but it doesn’t show up on the home page or on the page id I set it up on. Now it took me more than an hour to make it work. I am fed up. Somebody help!
    Ya I set up the times correctly too. (in millisecods) and the date too. What do I miss now?

  5. 9
  6. 10

    Thanks for the great post. I was looking exactly for this. However I was looking for a “hello bar” alternative and none seemed to work for me. Thanks for this insightful post.

Leave a Reply