php - Wordpress limit footer menu to 4 links before starting a new list -


so trying work out if it's @ possible have function display page links in footer does, but, after 4 links, create new ul , populate 4 links. , additionally limit total on links shown 8. on 2 lists allowed.

is possible? code..

// footer menu (should choose use one)     function bones_footer_links() {         // display wp3 menu if available         wp_nav_menu(array(             'container' => '',                              // remove nav container             'container_class' => 'footer-links clearfix',   // class of container (should choose use it)             'menu' => __( 'footer links', 'bonestheme' ),   // nav name             'menu_class' => 'nav footer-nav clearfix',      // adding custom nav class             'theme_location' => 'footer-links',             // it's located in theme             'before' => '',                                 // before menu             'after' => '',                                  // after menu             'link_before' => '',                            // before each link             'link_after' => '',                             // after each link             'depth' => 4,                                   // limit depth of nav             'fallback_cb' => 'bones_footer_links_fallback'  // fallback function         ));     } /* end bones footer link */  // fallback footer menu function bones_footer_links_fallback() {     wp_page_menu( array(         'show_home' => true,         'menu_class' => 'nav bottom-nav clearfix',      // adding custom nav class         'include'     => '',         'exclude'     => '',         'echo'        => true,         'link_before' => '',                            // before each link         'link_after' => ''                             // after each link     ) ); } 

which gives me:

<ul>     <li><a href="#" title="">link</a></li>     <li class="page_item page-item-9 current_page_item"><a href="#">link</a></li>     <li class="page_item page-item-46"><a href="#">link</a></li>     <li class="page_item page-item-42"><a href="#">link</a></li>     <li class="page_item page-item-44"><a href="#">link</a> </ul> 

what after 4 links, new ul this:

<ul class="list_third">     <li><a href="#">link text</a></li>     <li><a href="#">link text</a></li>     <li><a href="#">link text</a></li>     <li><a href="#">link text</a></li> </ul>  <ul class="list_third">     <li><a href="#">link text</a></li>     <li><a href="#">link text</a></li>     <li><a href="#">link text</a></li>     <li><a href="#">link text</a></li> </ul> 

with max of 8 links displayed in total.

i'm sure question has long been answered ran across while trying figure out similar figured i'd post found.

while isn't exactly looking it's possible use css column count come close. can check out same fiddle found here. sure helped me figured i'd pass along.

cheers! daniel

div#multicolumn { -moz-column-count: 2; -moz-column-gap: 20px; -webkit-column-count: 2; -webkit-column-gap: 20px; column-count: 2; column-gap: 20px; 

}