You are viewing an old revision of this post, from September 20, 2013 @ 00:20:32. See below for differences between this version and the current revision.

Using FlexNav with WordPress

I thought it beneficial to note this support page on integrating the great Flex Nav script with WordPress. You don't need a custom walker function. You can alter wp_nav_menu like this: [php] <pre><code>wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'flexnav', //Adding the class for FlexNav 'items_wrap' => '<ul data-breakpoint="800" id="%1$s">%3$s</ul>', // Adding data-breakpoint for FlexNav ));</code></pre> [/php] and proper script init should be: [php] <pre><code>jQuery(document).ready(function($){ $(".flexnav").flexNav({ }); });</code></pre> [/php]

Revisions

  • September 20, 2013 @ 00:21:32 [Current Revision] by PeterLugg
  • September 20, 2013 @ 00:21:32 by PeterLugg
  • September 20, 2013 @ 00:20:32 by PeterLugg

Revision Differences

September 20, 2013 @ 00:20:32Current Revision
Content
Unchanged: I thought it beneficial to note <a href="http:// wordpress.stackexchange.com/ questions/101021/ using-flexnav- with-wordpress" target="_blank">this</a> support page on integrating the great Flex Nav script with WordPress.Unchanged: I thought it beneficial to note <a href="http:// wordpress.stackexchange.com/ questions/101021/ using-flexnav- with-wordpress" target="_blank">this</a> support page on integrating the great Flex Nav script with WordPress.
 Added: You don't need a custom walker function. You can alter wp_nav_menu like this:
 Added: [php]
 Added: &lt;pre&gt;&lt; code&gt;wp_nav_menu( array(
 Added: 'theme_location' =&gt; 'primary',
 Added: 'menu_class' =&gt; 'flexnav', //Adding the class for FlexNav
 Added: 'items_wrap' =&gt; '&lt;ul data-breakpoint= &quot;800&quot; id=&quot;%1$s&quot; &gt;%3$s&lt;/ul&gt;', // Adding data-breakpoint for FlexNav
 Added: ));&lt;/code&gt; &lt;/pre&gt;
 Added: [/php]
 Added: and proper script init should be:
 Added: [php]
 Added: &lt;pre&gt;&lt; code&gt;jQuery( document).ready( function($){
 Added: $(&quot;.flexnav&quot;).flexNav({
 Added: });
 Added: });&lt;/code&gt; &lt;/pre&gt;
 Added: [/php]

Note: Spaces may be added to comparison text to allow better line wrapping.

Tags: , ,

No comments yet.

Leave a Reply