Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Fix for menu depth in bfa_new_wp3_menus.php (http://forum.bytesforall.com/showthread.php?t=20235)

tysonlt May 2, 2013 05:55 AM

Fix for menu depth in bfa_new_wp3_menus.php
 
Hi!

First time post... not sure if this is really silly, but I made this little fix and thought I would share just in case anyone else needs it... it's probably already done somewhere but I couldn't find it, so...

bfa_new_wp3_menus.php

PHP Code:

function bfa_new_wp3_menus(...) {

...

  
wp_nav_menu( array( 
    
'theme_location' => $theme_location
    
'container' => 'div'
    
'container_id' => $theme_location,
    
'menu_class' => $menu_class,
    
'menu_id' => $menu_id,
    
'link_before' => '<span>',
    
'link_after' => '</span>',
    
'depth' => $bfa_ata['levels_page_menu_bar']   //<<<<<<<<<<<<<< ADDED THIS
    
) );

... 


lmilesw May 2, 2013 06:15 AM

One issue with this "fix" is that it will require a redo if you upgrade the theme.

tysonlt May 2, 2013 07:14 AM

Yes... could it be applied in a future release? Am I even on the right track? Surely I am not the only one to have noticed this, because I have seen other threads where people have used that setting successfully.

juggledad May 2, 2013 09:11 AM

What is the issue this is suppose to fix?

tysonlt May 2, 2013 06:02 PM

I could not get the top level menu in the header to limit to one level. I wanted sub pages to display on the side, but I did not want the top menu to display a drop-down at all, so I tried setting the depth to 1 in the theme settings but it had no effect. When I applied the setting to the wp_nav_menu() call, it worked... the top-level menu was now limited to only the first level of the menu.

juggledad May 2, 2013 07:12 PM

When you build a custom menu, Atahualpa doesn't limit things because it is your custom menu. If you only want one lever, just have a one level menu. If you need a menu elsewhere with multiple levels, create another menu.


All times are GMT -6. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.