Announcement Bar

This plugin adds a jQuery file that will position a fixed bar at the top of your browser screen to show announcements (controlled by a custom post type [CPT]) on each page load. Built with simple HTML and javascript.

Upon installation, you can choose the prefix for your post type. Be sure to choose wisely, because once you publish your first post this can’t be changed. If you are having problems with redirects visit your permalinks page to flush your rewrite rules by visiting your permalinks settings page (no save needed).

New: A cookie is added and deleted when you toggle the bar open and closed. Depending on the position of the bar when you leave the page is where it will be when you re-visit the site.

For question please visit my blog @ http://austinpassy.com

The Link
Please be awware when publishing a post, as of right now, you have to fill in the content with non-html text and add a link into the link field. This link is really the permalink and is what gets counted when clicked on. It will also revert to the home page if missing, and not count againts the counter. If you’re getting 404 issues when visiting the permalink page, please refer to the FAQ section.

Download

Latest version: Download Announcement Bar v0.3.2 [[zip]] (Downloaded: 7126 times)

FAQ

I am getting a 404 error?

Please visit your permalinks settings page after activating the plugin.

Changelog

Version 0.3 (9/8/11)
  • Dashboard fix.
  • Other stuff I can’t remember.
Version 0.2.2 (6/23/11)
  • [BUG FIX] An error in the dashboard widget is casuing some large images. Sorry. Always escape.
Version 0.2.1 (6/13/11)
Version 0.2 (6/1/11)
  • Complete overhaul.
  • [NEW] Now saves bar position with cookies.
  • Added backwords compatibility for jQuery < 1.6.x.
  • [NEW] Add your own custom CSS.
Version 0.1.5 (5/16/11)
  • Updated .attr() to .prop() for jQuery 1.6.x. New minimun install requirements.
Version 0.1.4 (3/30/11)
  • Dashboard widget updated.
Version 0.1.3 (2/24/11)
  • Removed javscript link causing hang-ups.
Version 0.1.2 (2/9/11)
  • Updated the feed parser to comply with deprecated rss.php and use class-simplepie.php
Version 0.1.1 (12/23/10)
  • Update CSS z-index for WordPress 3.1 admin-bar.
Version 0.1 (12/21/10)
  • Readme.txt file updated a bit. POT file added to languages.
Version 0.09 (12/20/10)
  • post_type announcementbar incorect on post-type.php.
Version 0.08 (12/20/10)
  • Bug fixes.
Version 0.07 (12/20/10)
  • Plugin name changed.
Version 0.06 (12/19/10)
  • Fixed issue with is_admin_bar_showing to work only with WP 3.1 or greater.
  • Couldn’t find wp-load.php to create dynamic CSS.
Version 0.05 (12/19/10)
  • Fixed issue with slug stuck in readonly setting.
Version 0.04 (12/19/10)
  • Removed scripts and styles from the admin.
  • Removed filter, used during testing.
Version 0.03 (12/19/10)
  • Readme update.
  • Added Custom Post Type.
  • Added options panel.
  • Added jQuery & CSS.

TODO

  • Check rewrite rules flushing proper on slug change.
  • Better stats.
Version 0.02α (12/15/10)
  • Readme update.

Screenshots

  1. announcement-bar screenshot 1

    The settings page.

  2. announcement-bar screenshot 2

    The edit post page.

  3. announcement-bar screenshot 3

    The add post page.

  4. announcement-bar screenshot 4

    The drop-down bar.

42 Responses

  1. Albert A Corbett
    Albert A Corbett December 19, 2010 at 11:39 pm Reply

    I’M SORRY, MY ENGLISH NOT GOOD!!!

    How to configure the plugin? What content can I put this bar?
    I installed, but how do I insert the contents?

  2. bjordanov
    bjordanov December 21, 2010 at 2:00 am Reply

    I’m sorry for my english 2.

    Ok, so how can I make it not allways open.
    I mean can you update it with these options:
    1. When page opens, bar stays closed
    2. I can choose on which page, which text I wanna be seen.
    3. I can choose if someone had clicked on it , it is shown no more (for 24 perhaps)
    4. And last please make it work with HTML :)

    It’ll be the best plugin ever :)

  3. bjordanov
    bjordanov December 21, 2010 at 2:01 am Reply

    edit: 24hours I meant :p sry

  4. Redz
    Redz December 21, 2010 at 2:44 am Reply

    Hello

    After i installed the plugin and configured it, after creating new bar, when i preview it i get the 404 not found page .. so why is that ?

  5. Jace Carlson
    Jace Carlson December 21, 2010 at 2:49 am Reply

    Got the error

    postboxes is not defined
    [Break On This Error] postboxes.add_postbox_toggles( ‘settings_page_hellos-bar’ );

    after I created a post and returned to the options page.

  6. Jace Carlson
    Jace Carlson December 21, 2010 at 2:57 am Reply

    After leaving options page and coming back o it.

    Warning: array_slice() expects parameter 1 to be array, null given in /home/content/92/7070592/html/wp-content/plugins/hellos-bar/admin/admin.php on line 670

  7. Jace Carlson
    Jace Carlson December 21, 2010 at 3:04 am Reply

    It works, but would be so much cleaner if you accepted inline html rather than text in the post and html in a separate tag. I end up with this as the hello bar text:

    Check out PageLines — WordPress Themes for Professional Websites!

    Instead of the html being hidden in a link. This would be so much cleaner.

  8. Jace Carlson
    Jace Carlson December 21, 2010 at 3:10 am Reply

    Ok, now I’m confused. The second option works, with the entire text used as an html link, but on the plugin post page, there is distinct text for the Content section that says this: Please enter your plain text content here. (No HTML allowed)

    and distinct text for the Link field: This URL has been accessed 0 times.

  9. Jace Carlson
    Jace Carlson December 21, 2010 at 3:24 am Reply

    Final comment… until I think of another one. It’s working, except that it only handles a single post. I added a second post for a second affiliate, and now it only displays that second post and ignores the first one.

    I think you need to add logic to rotate or randomly pick posts, plus perhaps a checkbox on each post to make it active/inactive (display/not display).

    Great work so far!

  10. Jojo Mathews @Around Social
    Jojo Mathews @Around Social December 21, 2010 at 6:08 am Reply

    Seems to be a great plugin… just downloaded… thanks for this gr8 job…

  11. Adam K
    Adam K December 22, 2010 at 1:33 pm Reply

    So far, so good – running 0.1 on WP 3.0.3.

    I’d echo the suggestions of having options to have it show x times per visitor (like the WWSGD plugin), and allow inline HTML.

    Looks like you’re on track to a really sweet plugin, here – thanks for sharing!

  12. Chuck Reynolds
    Chuck Reynolds December 22, 2010 at 8:45 pm Reply

    Hah.. right on man… good plugin.
    Maybe have the ability to add a little icon to the left of the bar like hellobar has? Perhaps I’ll just mod it accordingly.

  13. toze baiao
    toze baiao January 3, 2011 at 9:43 am Reply

    Hi Austin,

    Great script! How can I customize the bar background to a pattern that matches by footer style.

    THKS

  14. Katoka SEO Services
    Katoka SEO Services January 5, 2011 at 9:03 pm Reply

    I just love this idea it is best feature can’t wait to introduce it to my clients.

  15. Kamal Hasa
    Kamal Hasa January 5, 2011 at 11:22 pm Reply

    Hello mate, Thanks for this nice plugin.

    I have installed and activated it on my site: http://npxp.com/

    The bar is not showing up at all! I did exactly what was told in the instructions. Do I have to edit something??

  16. luchosar
    luchosar January 22, 2011 at 9:11 pm Reply

    Tienes para la version 2.9.2 de WP ?

    Have for the version 2.9.2 of WP?

  17. Shrikant Joshi
    Shrikant Joshi February 27, 2011 at 12:01 am Reply

    Erm, I am running, or rather, trying to run Hellos Bar v 0.1.3 on a WP 3.1 install and I have disabled the WP Admin bar using the Custom Admin bar (to make space for the Hellos bar) but all I see is a huge black box!
    http://awesomescreenshot.com/0668ag0da

    I checked the source code of the page, and I can see the hellos bar div and the hellos-bar post, but all that appears is the huge black box – which drops down with nice animation, BTW. :D

    Also, to which side does the toggle switch on the options page need to be for the hellos-bar to be ON? Right now, I can’t figure out because it looks like this:
    http://awesomescreenshot.com/0538ag6c0

    All in all, thanks a zillion for your time and efforts! Without people like you, n00bs like us wouldn’t be pestering you.. :D

    Cheers!

  18. Nelke
    Nelke March 30, 2011 at 8:29 am Reply

    Is the Hellos Script available as HTML, jQuery, PHP?
    Want to build in my HTML Website

  19. leo
    leo April 11, 2011 at 4:03 am Reply

    I downloaded the latest version, but it seems like the text appear below the box.

    http://imgur.com/9dH5Z

    1. Samantha
      Samantha December 26, 2012 at 7:17 pm Reply

      Try to add this into Custom CSS : .announcement{line-height:10px !important}

  20. Pakblogger
    Pakblogger May 28, 2011 at 4:47 am Reply

    Is their a way to remove the hellos bar from being shown in the title in the browser tabs when any page in the blog is opened

  21. Patrick
    Patrick June 20, 2011 at 2:58 pm Reply

    If I want to put a short code into this bar would it work? Meaning: I use the “simple facebook connect” plugin which can be called using a short code. I’m curious if the short code would fire off in this bar. Could be a good use for sure.

  22. Karl
    Karl June 24, 2011 at 12:08 pm Reply

    Hello, I have installed the Hello bar in my website, and I can not activate the bar. I move the button left and right and nothing. The box stays red. I thought there would be a JavaScript error, but there was none. I though that may be if I disconnect all plugins but this one and nothing. I refreshed the permalinks, re-save them. And nothing. I got only one plugin, this one, I have nothing else running, YET, I can not get it up… (pun intended). Please help me.

  23. Todd
    Todd November 22, 2011 at 8:06 am Reply

    Is there a way to have the Announcement Bar start in the down position? This should be the default or at least a setting in options. How will anyone know there is an announcement otherwise?

  24. Freddy Lansky
    Freddy Lansky December 6, 2011 at 8:17 pm Reply

    Hello Sir,

    My annoucement bar stopped working after I moved to a new host. I believe it’s due to the css.php portion not properly parsing as it still loads the bar but only at the bottom of the page and with no css on it.

    Please help. Thanks for releasing such an awesome plugin, it works great with WPML by the way.

    info (a) OnlineChessLessons . NET

  25. Steve
    Steve April 29, 2012 at 5:44 pm Reply

    +1 to Todd’s question. Is there anyway to show it in the down position the first time it loads? The arrow icon is not very eye-catching and visitors may not realize it.

  26. Samantha
    Samantha December 26, 2012 at 7:18 pm Reply

    Is it possible to make the default (Open) instead of Close?

Leave a Reply

Comment Policy

By submitting a comment here, you grant this site a perpetual license to reproduce your words and name/Web site in attribution.

Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you use your site name, company name, or something completely random, we'll likely change it to whatever we want.