Wordpress Admin Toolbar Customization

The client wanted to add a custom menu to the WordPress admin bar (The correct term here is ‘WordPress Toolbar’; not admin bar, because in version 3.3 it is called toolbar.

There was a separate membership plugin to manage access to different membership levels. There was gated content only visible to subscribers. There were 4 membership levels. The client wanted to customize the newly added menu according to the membership level. i.e. For subscribers, there should be an ‘Unsubscribe’ menu item. For visitors who are not logged in ‘Register or Login’ should be displayed. For the logged-in users, if they are not yet subscribed, then the ‘Subscribe’ option should be displayed. These were some of the features the client needed to implement.


In this kind of project, we have to find the relevant hooks in the WordPress core and membership plugin. Then we have to hook into the execution time and do the required things for new functionality. WordPress has a rich interface to hook into the native menu creation process. We were able to do this seamlessly.



Written by UDSSL