Description
The Foundation Top Bar Navigation Menu plugin allows theme developers to display a WordPress menu as a responsive Foundation top bar. The plugin includes the following core functions:
- A walker that applies Foundation top bar classes to a menu or page list
- Registration of a default āTop Barā menu location
- The ability to include a basic version of Foundation that supports the top bar
Visit Zurb Foundation to learn more about the Foundation top bar and to view an example.
Usage
Download and include the Foundation framework in your theme (or load the basic version included with the plugin ā see Notes below.)
Assign a new or existing WordPress menu into the āTop Barā menu location. (or use āwp_list_pagesā to display a list of pages as a top bar ā see below.)
Edit your themeās templates to display the top bar menu where youād like it to appear. Use WordPressā āwp_nav_menuā function to display the top bar menu:
<?php
if ( has_nav_menu('topbar') ) {
wp_nav_menu( array(
'theme_location' => 'topbar',
'container' => false,
'walker' => new ftb_menu()
));
}
?>
A list of pages can be displayed instead of a menu using the āwp_list_pagesā function:
<?php
wp_list_pages( array(
'title_li' => '',
'walker' => new ftb_pages()
));
?>
Notes
-
The ftb_menu() and ftb_pages() walkers both accept a single āno_wrapā argument. Including this argument will remove the default top bar HTML wrapper and display just the
<ul>
unordered list. -
āwp_nav_menu() -> theme_locationā argument can be set to any registered menu area.
-
This plugin optionally includes a basic version of Foundation 5.5.2 that contains only top bar support. It is recommended that Foundation be included directly in your theme instead of using this basic version. To load the pluginās basic version in your theme set āLoad Foundation Basic in Themeā to ātrueā in the āSettings -> Generalā admin screen.
-
Visit Zurb Foundation to download Foundation and to view installation and usage documentation.
-
Default WordPress menu classes are not included in outputted top bar HTML.
Notes
Top bar styling is the default included with the Foundation framework. Some customization is possible using Foundation and/or WordPress methods, but any customizations must be implemented by theme developers.
This plugin is developed using Zurb Foundation version 5.5.2.
Screenshots
Installation
- Download and unzip the plugin file.
- Upload the unzipped āfoundation-top-bar-menuā directory to your ā/wp-content/plugins/ā directory.
- Activate the plugin through the āPluginsā menu in WordPress.
- See āDescriptionā for usage instructions.
Reviews
Contributors & Developers
“Foundation Top Bar Navigation Menu” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Foundation Top Bar Navigation Menu” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0
- Initial release.