Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Fix for menu depth in bfa_new_wp3_menus.php


  #1  
Old May 2, 2013, 05:55 AM
tysonlt
 
4 posts · May 2013
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
    
) );

... 
  #2  
Old May 2, 2013, 06:15 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
One issue with this "fix" is that it will require a redo if you upgrade the theme.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old May 2, 2013, 07:14 AM
tysonlt
 
4 posts · May 2013
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.
  #4  
Old May 2, 2013, 09:11 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What is the issue this is suppose to fix?

Last edited by juggledad; May 2, 2013 at 12:37 PM.
  #5  
Old May 2, 2013, 06:02 PM
tysonlt
 
4 posts · May 2013
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.

Last edited by tysonlt; May 2, 2013 at 06:05 PM. Reason: more information
  #6  
Old May 2, 2013, 07:12 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.

Last edited by juggledad; May 2, 2013 at 07:22 PM.

Bookmarks

Tags
menu



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Widget List Items depth, 4th and lower level? barnz2k Sidebars & Widgets 9 Jan 9, 2011 03:12 PM
altering sub menu bar depth by parent davidcoats Page & Category Menu Bars 0 Jun 5, 2010 07:47 PM


All times are GMT -6. The time now is 06:49 PM.


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