Using FlexNav with WordPress

Has anyone managed to get the FlexNav plugin – http://jasonweaver.name/lab/flexiblenavigation/ – working with WordPress?

I’ve got an HTML version of the site working fine, but I’m running into trouble when integrating with WordPress as WordPress uses it’s own classes, ids etc. on menu items and this seems to override the flexnav plugin.

Read More

I’m wondering if I should be trying to replicate the menu structure that the plugin creates using a custom walker function, or just re-writing the CSS with what WordPress gives me?

Any advice appreciated!

Thanks

Related posts

1 comment

  1. You don’t need a custom walker function. You can alter wp_nav_menu like this:

        wp_nav_menu( array( 
        'theme_location' => 'primary',
        'menu_class' => 'flexnav', //Adding the class for FlexNav
        'items_wrap' => '<ul data-breakpoint="800" id="%1$s" class="%2$s">%3$s</ul>', // Adding data-breakpoint for FlexNav
        ));
    

    and proper script init should be:

    jQuery(document).ready(function($){
       $(".flexnav").flexNav({
    });
    });
    

    Drop menu button somewhere outside navigation:

    <div class="menu-button">Menu</div>
    

    But still does not work. As toscho refered, FlexNav needs a small modification to work in WordPress. Take a look this mod here http://pastebin.com/ZEMQFFsA

    UPDATE: Since v.1.0 FlexNav support jQuery noConflict mode

Comments are closed.