
BuddyPress Navigation Extension For A Genesis Theme
- June 22, 2015
- Leave a comment
Dynamic websites these days feed us with effective customization at all ends possible. We can tinker with the different options available on the dynamic website themes and have the best advantage out of them in line with our requirements. We got a menu update request from one of our Clients for his BuddyPress based website. He wanted existing primary navigation extension by adding a new dropdown for logged in users. The new dropdown was the list of URLs such as View Profile, Logout, Messages. The theme was implemented using genesis theme framework. We extended primary menu by adding code in functions.php of theme file without modifying the code of BuddyPress plugin. We achieved this functionality by implementing the following steps:
- Hooked menu by using wp_nav_menu_items
- Accessed $bp global
- Looped through $bp->bp_na navigation to get account bar links
- Generated HTML for BuddyPress account bar
- Fetched primary menu position to attach account bar
User Comments