Title: Custom topbar as default
Last modified: August 21, 2016

---

# Custom topbar as default

 *  Resolved [Nasah](https://wordpress.org/support/users/nasah/)
 * (@nasah)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-topbar-as-default/)
 * Hi Bob, first of all, thx for a great and very flexible plugin. Love it a bunch.
   I was just wondering, how can I use a custom default topbar at installation? 
   Now when I install this, I get my custom samples, but the default row in topbar
   stays the same. Any way to change this, so my custombar gets loaded to the AllTopbars
   instead of just the SampleTopbars “directory”? Thx again 🙂
 * [https://wordpress.org/plugins/wp-topbar/](https://wordpress.org/plugins/wp-topbar/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * (@rfgoetz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-topbar-as-default/#post-4624213)
 * I have a way that I’ve seen other plugins do it. They allow you to use a custom
   PHP function to override default values.
 * I have coded up a way, would you be willing to test it?
 * If so, send me your email address and I will send you the beta code:
 * [http://zwebify.com/contact/](http://zwebify.com/contact/)
 * Here are the instructions that I wrote up:
 *     ```
       //How to create your own Custom Default TopBar
       //
       // When the plugin is asked to create a new default TopBar, it first loads the array wptbOptions[]
       // with all of the default values. Then, it looks to see if this function 'wptb_custom_default_values'
       // exists.  If it does, it will call that function.  That function should ONLY update values in the
       // wptbOptions[] array.
       //
       // You can copy this sample function into your theme's function.php or
       // some other file that is loaded on your admin pages.
       //
       // Change any options below to match what you want in your own custom default TopBar.
       //
       // To see how to set the options, you can create a TopBar via the user interface, then export it.
       // The export file will show you how to set each of the options below.
       //
       // sample code goes here....
       ```
   
 *  Thread Starter [Nasah](https://wordpress.org/support/users/nasah/)
 * (@nasah)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-topbar-as-default/#post-4624248)
 * Hi Bob, thx for the quick reply. I would like to test it, so sending you an email
   straight away 🙂
 *  Plugin Author [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * (@rfgoetz)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/custom-topbar-as-default/#post-4624300)
 * Added feature to v. 5.23.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom topbar as default’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-topbar_706d6d.svg)
 * [WP-TopBar](https://wordpress.org/plugins/wp-topbar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-topbar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-topbar/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-topbar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-topbar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-topbar/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/custom-topbar-as-default/#post-4624300)
 * Status: resolved