Output of the menu items
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 7 Jan 2015 14:22:46 +0000 (09:22 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 7 Jan 2015 14:22:46 +0000 (09:22 -0500)
Output using the foundation accordion js.

page-374.php

index 079a377..1932eb5 100644 (file)
                     'sort_order'  => 'ASC',
                     'sort_column' => 'menu_order'
                 ));
+                $i = 0;
                 if ($menus):?>
                 <ul class="accordion" data-accordion>
                 <?php foreach($menus as $menu):?>
                     <li class="accordion-navigation">
-                        <a href="#<?php echo $menu->post_slug;?>"><?php echo $menu->post_title;?></a>
-                        <div><?php echo apply_filters( 'the_content', $menu->post_content );?></div>
+                        <a href="#menu-<?php echo $menu->ID;?>"><strong><?php echo $menu->post_title;?></strong> <span class="right">view menu</span></a>
+                        <div
+                            id="menu-<?php echo $menu->ID;?>"
+                            class="content<?php if (++$i == 1) {echo ' active';}?>"><?php echo apply_filters( 'the_content', $menu->post_content );?></div>
                     </li>
                 <?php endforeach;?>
                 </ul>