WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WP-TopBar

Create MULTIPLE, ROTATABLE TopBars that will be shown at the top of your website. TopBars are selected by a variety of options - includes scheduler!

I have a new translation

Contact me to help with a translation: http://zwebify.com/contact/ I will install at the next update.

Current translations are provided by: Spanish (Latin American) - Andrew Kurtis - http://www.webhostinghub.com/

My TopBar is not working. What should I do?

Are you upgrading from an old version? I do my best to allow for clean upgrades. Just in case, try creating a default TopBar. If that works, you may have CSS or other incompatabilities on the older TopBar that does not work with the latest version.

Also, check for any messages under the Live Preview heading on the Admin Page. It will tell you if you have cookies or time settings that will prevent the TopBar from loading.

You may have custom CSS or HTML settings that prevent the TopBar from loading. If you entered any setting that are not valid, the TopBar will not load. Try deleting the settings and then re-entering your custom CSS or HTML until you find the one that is causing the issue.

You can also use the Debug page to see if you can see an error.

HELP! I am using custom PHP, CSS or HTML and now my website is broken

Don't Panic! You have two options to fix this: 1. Append &nopreview to the url when you are trying to edit a TopBar. E.g. https://www.dummy.org/wp/wp-admin/?page=wp-topbar.php&action=phptexttab&barid=422116&nopreview. Hit ENTER to reload the page. You should now be able to edit the custom php. 2. Go into your database tool (usually using phpMyAdmin), find the wp-topbar table and delete the offending row.

My TopBar does not support my local language

The problem is with your table collation. You need to change the collation to utf8_general_ci.

Run this query from your phpMyAdmin to change the collation.
Make sure to change the word DATABASEPREFIX below with your database prefix from your wp-config.php file.

ALTER TABLE 'DATABASEPREFIX'_topbar_data CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci

Of course, make a backup of your table first!

(Thanks to samhat for help on this one!)

How can I have my own custom TopBars show on the Samples tab?

First create all the TopBars you want as custom Samples. Then export the TopBars in the JSON format. Now, create a location on your server to store the files. For example ../wp/wp-content/plugins/wp-topbar-samples. Next rename the export file to custom_topbars.json. Now move that file, plus any images you need into the directory you created. Finally, go to the General Settings Tab and enter the URL for the directory in the "Custom Samples URL" field. Make sure you have allow_url_fopen turned on in your php.ini (otherwise, we cannot read the file.) Now, the TopBar will first display the Standard samples then the TopBars from your custom_topbars.json file. You can then copy these new TopBars just like the Standard samples.

How do the Rotate Toolbars Global Setting work?

This new settings will select all the valid TopBars that can be shown on a pageview (e.g. those that match all the control, date/time criteria.) Then it will rotate through the TopBars in priority order - with the TopBars with the highest priority shown first. This option will override the use of Close Buttons or Re-open Buttons. It will also ignore the Scroll Action option. You can set the delay between TopBars on in the Global Settings tab.

How does the Include/Exclude logic work behind the scenes?

You have four choices to handle include (or exclude) the TopBar from showing: Page ID - this only checks the current page's ID against the list you entered. Category ID - this only checks the current category IDs against the list you entered. The criteria is satisfied if any of the page's category IDs match what you entered. We only check the default "category" taxonomy. Both - both the Page ID and Category criteria must match for the TopBar to show Either - either the Page ID or Category criteria need to match for the TopBar to show

The default is to check by PageId.

How do the cookies work behind the scenes?

If you allow the user to close the TopBar, then the plugin checks to see if you have enabled cookies. If they are not enabled, it deletes any existing cookies. If they are enabled, it looks to see if a cookie has been created. A cookie is only created if the TopBar has been previously closed by the user. If it finds a cookie, it prevents the TopBar from showing.

If you change the Cookie Value to something new, the TopBar will show up again. This is useful if you want to force the TopBar to show on new content. Make sure to select something you haven't used before. A good idea is to increment the value by one every time you want to force the TopBar to show.

With Version 4.00+, all TopBars must share the same cookie settings for this to work. You can set the TopBars to be the same by using the new Close Button tab on the main page

How does the Priority field work?

The Plugin randomly selects a valid TopBar to show using this field to skew how they are selected. The TopBar multiplies a random number (between 0 and 1) with the TopBar's Priority value (which is a number between 1 to 100). A higher number means this TopBar will be selected more frequently; a lower number means less frequently.

How so I delete a TopBar?

On the All Tables view, select the TopBars via the Check Box and selete the "Delete" function from the Bulk Actions drop down list.

How are TopBars selected to show?

See the Priority question above to see how they are selected. The TopBar will select only those TopBars that are valid per the date/time criteria. Once a TopBar is selected to show, it then goes through the Control Options. That checks to see if the TopBar should be shown on the Home Page (or not) and which Page IDs or Category IDs the TopBar should show (or not).

The Final check is to see if the TopBar has cookie controls (see above). If the user is allowed to close the TopBar and cookies are enabled, then we look for a cookie. If one is found, and it matches the cookie value, then the TopBar is not shown.

What TimeZone should I use when I enter Start/Stop Times

You should enter the time in the same timezone that WordPress is setup to use. (See the WordPress|Settings|General tab).

We also print the current WordPress time on the Control Tab right next to the Start option field. Use that to guide how you should enter the time in.

What CSS ID's are available?

Use "#topbar"

What if I want to fix the TopBar to the top of the page?

Use the Force TopBar to Be Fixed On Top of Page (on the Main Options Tab).

What if I want to create my own Default TopBar?

See the file SAMPLE_wptb_custom_default_values.php for instructions on how to do that.

How to Find the Page ID

You can find the Page ID in the Edit Post or Edit Page URL. For example, the page ID for the following example is “1234.”

http://example.WordPress.com/wp-admin/page.php?action=edit&post=1234

How do I test the TopBar?

To test the TopBar on your site, you can set the Page IDs (in Main Options) to a single page (and not your home page) and select Include/Exclude Logic to be "Page IDs". Then go to that Page to see how the TopBar is working.

Why does my TopBar look odd on Internet Explorer?

IE does not (yet) implement gradients like other browsers. So, make sure you test your TopBar on all the major browsers.

How dow I uninstall?

Go to the Uninstall tab (or if are on a Multi Site install, you first need to login as a Super Admin then select the Uninstall from the TopBar Menu List) and then click the Uninstall button at the bottom of the page. You'll be sent to the WordPress Plugins page. Now deactivate and uninstall the Plugin

Requires: 3.2.1 or higher
Compatible up to: 3.9.1
Last Updated: 2014-7-5
Downloads: 48,443

Ratings

4 stars
4.1 out of 5 stars

Support

7 of 8 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,3,3
100,2,2 100,1,1
75,4,3 100,1,1 100,1,1 0,1,0
67,3,2
100,1,1 33,3,1
25,4,1 0,1,0
33,3,1
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,2,2
100,1,1 100,1,1
100,1,1